Jump to content

Deprecated: Function split() is deprecated in...


thealexangroup

Recommended Posts

ERROR:  Deprecated: Function split() is deprecated in... /adminPage.php on line 262

 

how would code look when (if) replaced with "explode"

 

260        <?
261        if($dtime){
262        $m=split('[-," "]',$dtime);
263        $s=date("jS F Y", mktime(0, 0, 0, $m[1], $m[2], $m[0]));
264        }

 

 

thanx in advance,

 

a

Link to comment
Share on other sites

"/ (-|\s|) /"  

Are the spaces for readability or is this not "/(-|\s|)/" ?

 

I don't like "sed" myself because it does not meet my immediate needs.  Stream editing:  apples are apples, oranges are oranges.  The underling concept is there.

I always choose rpl over sed day to day because sed is so prone to miss firing.  Besides this the numerous variations of regexp which will accomplish quite the same objective is trivial functionality at best.  Not precisely hamfisted but I can read '[-," "]' and I don't see any clever ways to disguise just this.

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.