Jump to content

Explode replacement or a work around


KingOfHeart

Recommended Posts

$out = wordwrap($data,400,"@");

$output = explode("@",$out, -1);

 

By default a -1 no longer works properly for me so I need a similar method to get the same output.

I made a game back then that reads the php file. So I could change the extension to .php4/.php5 (forget which one would work) the sockets will still link to the default .php file.

So how can I fix this?

Link to comment
Share on other sites

Yes, that looks normal, same as my manual...

 

Sorry, I think you should explain what it did before. If 'limit' wasn't present (and no other third arg existed) then, just mimic using my previous answer.

 

Otherwise please explain fully and clearly what results your getting and what you expected.

Link to comment
Share on other sites

What version of PHP is running on your server?

Are you 100% positive that the issue isn't with the input?

When you say 'nothing', is that what is really happening, are you sure it's not an empty array? (if so re-read the manual!)

 

Try isolating the issue...

$out="here@there@where@lost";
$output = explode("@",$out, -1);

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.