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?Moderator: General Moderators
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?Well yes, your logic is right, but your use of single quotes isn't, although I expect that's a typoa94060 wrote:Hi,i just wanted to clear up the explode function.
In this code ex.
thats pretty much right,right?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?
i changed it,just check it for me please? i also dont imply that feyd is just the best mod,you all are goodd11wtq wrote:Well yes, your logic is right, but your use of single quotes isn't, although I expect that's a typoa94060 wrote:Hi,i just wanted to clear up the explode function.
In this code ex.
thats pretty much right,right?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?
Code: Select all
echo "The best mod is $table[0]";Code: Select all
echo 'The best mod is '.$table[0];