Page 1 of 1
Clearing up the Explode function
Posted: Wed Mar 08, 2006 12:54 pm
by a94060
Hi,i just wanted to clear up the explode function.
In this code ex.
Code: Select all
$admins= "feyd:jcart:d11person";
$table=explode(":",$admins);
echo 'The best mod is ".$table[0]"';//this should give out feyd as the var?
thats pretty much right,right?
Re: Clearing up the Explode function
Posted: Wed Mar 08, 2006 1:02 pm
by Chris Corbyn
a94060 wrote:Hi,i just wanted to clear up the explode function.
In this code ex.
Code: Select all
$admins= "feyd:jcart:d11person";
$table=explode(":",$admins);
echo 'The best mod is ".$table[0]"';//this should give out feyd as the var?
thats pretty much right,right?
Well yes, your logic is right, but your use of single quotes isn't, although I expect that's a typo

Posted: Wed Mar 08, 2006 1:20 pm
by feyd
brown nosing it gets you nowhere.

Re: Clearing up the Explode function
Posted: Wed Mar 08, 2006 1:28 pm
by a94060
d11wtq wrote:a94060 wrote:Hi,i just wanted to clear up the explode function.
In this code ex.
Code: Select all
$admins= "feyd:jcart:d11person";
$table=explode(":",$admins);
echo "The best mod is '.$table[0]'";//this should give out feyd as the var?
thats pretty much right,right?
Well yes, your logic is right, but your use of single quotes isn't, although I expect that's a typo

i changed it,just check it for me please? i also dont imply that feyd is just the best mod,you all are good

Posted: Wed Mar 08, 2006 1:35 pm
by josh
Check what? Your quotes are still fubar'd
Posted: Thu Mar 09, 2006 12:35 pm
by a94060
i still dont get what you mean,:( can you show me? i still remeber when i asked my first problem,i did not understand th equote problem

Posted: Thu Mar 09, 2006 12:40 pm
by John Cartwright
or my preference
Code: Select all
echo 'The best mod is '.$table[0];
and read
http://ca3.php.net/manual/en/language.t ... tax.single