How to fix the error with split() in php? [duplicate]












-1
















This question already has an answer here:




  • What's the ERROR here in this code…? PHP

    3 answers



  • Deprecated: Function split() is deprecated. How to rewrite this statement?

    4 answers




How to fix this error.




Fatal error: Uncaught Error: Call to undefined function split() in /home/kmusi/public_html/base.php(725) : eval()'d code:9 Stack trace: #0 /home/kmusi/public_html/base.php(725) : eval()'d code(74): gregorian_to_jalaliq2a('1519984652') #1 /home/kmusi/public_html/base.php(761): when_to_html_override_1_in_gregorian2jalali_overrides_php('1519984652', '7') #2 /home/kmusi/public_html/base.php(822): call('when_to_html...', Array) #3 /home/kmusi/public_html/app/format.php(780): call_override('when_to_html', Array) #4 /home/kmusi/public_html/app/format.php(581): when_to_html('1519984652', '7') #5 /home/kmusi/public_html/app/format.php(826): post_html_fields(Array, 1, NULL, Array, NULL, Array) #6 /home/kmusi/public_html/app/format.php(986): other_to_q_html_fields(Array, 1, NULL, Array, NULL, Array) #7 /home/kmusi/public_html/app/list.p in /home/kmusi/public_html/base.php(725) : eval()'d code on line 9











share|improve this question















marked as duplicate by Funk Forty Niner php
Users with the  php badge can single-handedly close php questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 24 '18 at 3:31


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















  • what is your php version?

    – Igor Carvalho
    Nov 24 '18 at 2:37






  • 1





    @Igor Carvalho i use php 7

    – Akshay Kumar
    Nov 24 '18 at 2:39











  • Did you not search for the error on the Internet? I found one and used it to mark it as a duplicate. I had forgotten I answered for it also, heh. It also contains a few comments you should see.

    – Funk Forty Niner
    Nov 24 '18 at 3:32


















-1
















This question already has an answer here:




  • What's the ERROR here in this code…? PHP

    3 answers



  • Deprecated: Function split() is deprecated. How to rewrite this statement?

    4 answers




How to fix this error.




Fatal error: Uncaught Error: Call to undefined function split() in /home/kmusi/public_html/base.php(725) : eval()'d code:9 Stack trace: #0 /home/kmusi/public_html/base.php(725) : eval()'d code(74): gregorian_to_jalaliq2a('1519984652') #1 /home/kmusi/public_html/base.php(761): when_to_html_override_1_in_gregorian2jalali_overrides_php('1519984652', '7') #2 /home/kmusi/public_html/base.php(822): call('when_to_html...', Array) #3 /home/kmusi/public_html/app/format.php(780): call_override('when_to_html', Array) #4 /home/kmusi/public_html/app/format.php(581): when_to_html('1519984652', '7') #5 /home/kmusi/public_html/app/format.php(826): post_html_fields(Array, 1, NULL, Array, NULL, Array) #6 /home/kmusi/public_html/app/format.php(986): other_to_q_html_fields(Array, 1, NULL, Array, NULL, Array) #7 /home/kmusi/public_html/app/list.p in /home/kmusi/public_html/base.php(725) : eval()'d code on line 9











share|improve this question















marked as duplicate by Funk Forty Niner php
Users with the  php badge can single-handedly close php questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 24 '18 at 3:31


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















  • what is your php version?

    – Igor Carvalho
    Nov 24 '18 at 2:37






  • 1





    @Igor Carvalho i use php 7

    – Akshay Kumar
    Nov 24 '18 at 2:39











  • Did you not search for the error on the Internet? I found one and used it to mark it as a duplicate. I had forgotten I answered for it also, heh. It also contains a few comments you should see.

    – Funk Forty Niner
    Nov 24 '18 at 3:32
















-1












-1








-1









This question already has an answer here:




  • What's the ERROR here in this code…? PHP

    3 answers



  • Deprecated: Function split() is deprecated. How to rewrite this statement?

    4 answers




How to fix this error.




Fatal error: Uncaught Error: Call to undefined function split() in /home/kmusi/public_html/base.php(725) : eval()'d code:9 Stack trace: #0 /home/kmusi/public_html/base.php(725) : eval()'d code(74): gregorian_to_jalaliq2a('1519984652') #1 /home/kmusi/public_html/base.php(761): when_to_html_override_1_in_gregorian2jalali_overrides_php('1519984652', '7') #2 /home/kmusi/public_html/base.php(822): call('when_to_html...', Array) #3 /home/kmusi/public_html/app/format.php(780): call_override('when_to_html', Array) #4 /home/kmusi/public_html/app/format.php(581): when_to_html('1519984652', '7') #5 /home/kmusi/public_html/app/format.php(826): post_html_fields(Array, 1, NULL, Array, NULL, Array) #6 /home/kmusi/public_html/app/format.php(986): other_to_q_html_fields(Array, 1, NULL, Array, NULL, Array) #7 /home/kmusi/public_html/app/list.p in /home/kmusi/public_html/base.php(725) : eval()'d code on line 9











share|improve this question

















This question already has an answer here:




  • What's the ERROR here in this code…? PHP

    3 answers



  • Deprecated: Function split() is deprecated. How to rewrite this statement?

    4 answers




How to fix this error.




Fatal error: Uncaught Error: Call to undefined function split() in /home/kmusi/public_html/base.php(725) : eval()'d code:9 Stack trace: #0 /home/kmusi/public_html/base.php(725) : eval()'d code(74): gregorian_to_jalaliq2a('1519984652') #1 /home/kmusi/public_html/base.php(761): when_to_html_override_1_in_gregorian2jalali_overrides_php('1519984652', '7') #2 /home/kmusi/public_html/base.php(822): call('when_to_html...', Array) #3 /home/kmusi/public_html/app/format.php(780): call_override('when_to_html', Array) #4 /home/kmusi/public_html/app/format.php(581): when_to_html('1519984652', '7') #5 /home/kmusi/public_html/app/format.php(826): post_html_fields(Array, 1, NULL, Array, NULL, Array) #6 /home/kmusi/public_html/app/format.php(986): other_to_q_html_fields(Array, 1, NULL, Array, NULL, Array) #7 /home/kmusi/public_html/app/list.p in /home/kmusi/public_html/base.php(725) : eval()'d code on line 9






This question already has an answer here:




  • What's the ERROR here in this code…? PHP

    3 answers



  • Deprecated: Function split() is deprecated. How to rewrite this statement?

    4 answers








php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 3:27









Funk Forty Niner

1




1










asked Nov 24 '18 at 2:36









Akshay KumarAkshay Kumar

204




204




marked as duplicate by Funk Forty Niner php
Users with the  php badge can single-handedly close php questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 24 '18 at 3:31


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Funk Forty Niner php
Users with the  php badge can single-handedly close php questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 24 '18 at 3:31


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • what is your php version?

    – Igor Carvalho
    Nov 24 '18 at 2:37






  • 1





    @Igor Carvalho i use php 7

    – Akshay Kumar
    Nov 24 '18 at 2:39











  • Did you not search for the error on the Internet? I found one and used it to mark it as a duplicate. I had forgotten I answered for it also, heh. It also contains a few comments you should see.

    – Funk Forty Niner
    Nov 24 '18 at 3:32





















  • what is your php version?

    – Igor Carvalho
    Nov 24 '18 at 2:37






  • 1





    @Igor Carvalho i use php 7

    – Akshay Kumar
    Nov 24 '18 at 2:39











  • Did you not search for the error on the Internet? I found one and used it to mark it as a duplicate. I had forgotten I answered for it also, heh. It also contains a few comments you should see.

    – Funk Forty Niner
    Nov 24 '18 at 3:32



















what is your php version?

– Igor Carvalho
Nov 24 '18 at 2:37





what is your php version?

– Igor Carvalho
Nov 24 '18 at 2:37




1




1





@Igor Carvalho i use php 7

– Akshay Kumar
Nov 24 '18 at 2:39





@Igor Carvalho i use php 7

– Akshay Kumar
Nov 24 '18 at 2:39













Did you not search for the error on the Internet? I found one and used it to mark it as a duplicate. I had forgotten I answered for it also, heh. It also contains a few comments you should see.

– Funk Forty Niner
Nov 24 '18 at 3:32







Did you not search for the error on the Internet? I found one and used it to mark it as a duplicate. I had forgotten I answered for it also, heh. It also contains a few comments you should see.

– Funk Forty Niner
Nov 24 '18 at 3:32














2 Answers
2






active

oldest

votes


















3














The split() function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.






share|improve this answer































    1














    Replace split() with explode()



    $string = "a, b, c";
    $array = explode(", ", $string);


    It will give you array with 3 values in it.



    split was deprecated in previous version of php but I think in php 7 it is removed so this is why it is saying undefined.






    share|improve this answer
































      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      The split() function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.






      share|improve this answer




























        3














        The split() function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.






        share|improve this answer


























          3












          3








          3







          The split() function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.






          share|improve this answer













          The split() function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 24 '18 at 2:41









          Igor CarvalhoIgor Carvalho

          378216




          378216

























              1














              Replace split() with explode()



              $string = "a, b, c";
              $array = explode(", ", $string);


              It will give you array with 3 values in it.



              split was deprecated in previous version of php but I think in php 7 it is removed so this is why it is saying undefined.






              share|improve this answer






























                1














                Replace split() with explode()



                $string = "a, b, c";
                $array = explode(", ", $string);


                It will give you array with 3 values in it.



                split was deprecated in previous version of php but I think in php 7 it is removed so this is why it is saying undefined.






                share|improve this answer




























                  1












                  1








                  1







                  Replace split() with explode()



                  $string = "a, b, c";
                  $array = explode(", ", $string);


                  It will give you array with 3 values in it.



                  split was deprecated in previous version of php but I think in php 7 it is removed so this is why it is saying undefined.






                  share|improve this answer















                  Replace split() with explode()



                  $string = "a, b, c";
                  $array = explode(", ", $string);


                  It will give you array with 3 values in it.



                  split was deprecated in previous version of php but I think in php 7 it is removed so this is why it is saying undefined.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 24 '18 at 2:51









                  Nick

                  26.8k111939




                  26.8k111939










                  answered Nov 24 '18 at 2:40









                  AkhileshAkhilesh

                  626




                  626















                      Popular posts from this blog

                      Berounka

                      Sphinx de Gizeh

                      Different font size/position of beamer's navigation symbols template's content depending on regular/plain...