gloriaewold41
asked on
str_replace
Hi experts,
I need to split a line wich is in fact two words separated by comma and then identify the output as two words:
word1,word2
result:
$word1 = "word1";
$word2 = "word2";
Please help.
I need to split a line wich is in fact two words separated by comma and then identify the output as two words:
word1,word2
result:
$word1 = "word1";
$word2 = "word2";
Please help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. Exactly what i needed.
$line = 'blabla,whatever;
$words = explode(',',$line);
Echo $words[0];
Echo $words[1];
or
Print_r($words);