PDA

View Full Version : Walking through a string


speedway
01-25-2003, 12:22 AM
Hi all

PHP learner here. I want to "walk" through a string and place each item in an array for later use. I will be working on the list of banned emails providers in VB that is a big string with each item spearated by a space.

I want to display these in a page if a new user wishes to see if their providers address had been banned.

Any help appreciated

Cheers

mr e
01-25-2003, 05:16 AM
i think this'll work


$banned = explode(" ", $stringofbannedusers);

$i = 0;
for ($i=0; $i<$banned-1; $i++) {
print $banned[$i];
}

speedway
01-25-2003, 11:37 AM
That will do it - thanks. Looked up explode and it is exactly what I want

Cheers