Jump to content

PHP Split Problems


yanjchan

Recommended Posts

Ok, I have my string here:

cb9f35facc807b87b3024726e6ffe4ff0382b6e54f84f082c4292fb8251378c3:edba6720b115c4d20fb78b4371d84d3783b1094fac000fc886d865bc1eb9572a@76.103.101.157

That is separated by : and @.

 

I get the string from the cookie using the PHP $_COOKIE['blah'], which works fine.

Then, when I try to split it using:

 

$raw = $_COOKIE['blah'];

$blah = split('[:@]', $raw);

echo "$blah[0]<br />";

echo "$blah[1]<br />";

echo "$blah[2]<br />";

 

Only $blah[0] returns a variable, which is the entire string.

I'm sorry if I'm making a stupid mistake, as I think I've mentioned before, I'm pretty new to PHP.

 

Thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.