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
https://forums.phpfreaks.com/topic/216720-explode-replacement-or-a-work-around/
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.

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);

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.