Single row explode with loop
pI have a some data stored in a single column mysql DB that is like
this:/p precode1-Yizle-smallpic-this is pretty
cool-2-User-smallpic-testing!1-Yizle-smallpic-this is pretty
cool-2-User-smallpic-testing!- /code/pre pNow I want to output that data
in a for loop and need it to loop every 4 hyphens, as the data output
would be/p precode$uid,$username,$userpicurl,$comment.. /code/pre pThe
code I have so far, obviously works, but only returns the first
occurrence. /p precodeforeach($result-gt;fetch_assoc() as $v){ list($uid,
$username, $userpicurl, $comment) = explode(-, $v); print $uid $username
$userpicurl $comment; } /code/pre
No comments:
Post a Comment