Raised This Month: $ Target: $400
 0% 

A little PHP help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-29-2006 , 00:20   Re: A little PHP help
Reply With Quote #2

PHP Code:
//Given that $MyString holds the line:
//"green", "blue", "yellow, red", "orange"
//You will get $Array_of_things with each one seperated. The space and quotes need to be set up like you said. With quote then comma then space then quote again.
$Array_of_things str_replace("\"","",explode("\", \""$MyString));

//Now you can use
print_r($Array_of_things);
//Or use a
foreach($Array_of_things as $Key => $String)
{
    echo 
"$Key => $String<br />";

Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode