How to fix the error with split() in php? [duplicate]
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
php
marked as duplicate by Funk Forty Niner
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.
add a comment |
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
php
marked as duplicate by Funk Forty Niner
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
add a comment |
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
php
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
php
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
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
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
The split()
function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.
add a comment |
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.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The split()
function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.
add a comment |
The split()
function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.
add a comment |
The split()
function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.
The split()
function was removed in PHP 7. You can replace it with preg_split() or explode() function depending on the circumstances.
answered Nov 24 '18 at 2:41
Igor CarvalhoIgor Carvalho
378216
378216
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited Nov 24 '18 at 2:51
Nick
26.8k111939
26.8k111939
answered Nov 24 '18 at 2:40
AkhileshAkhilesh
626
626
add a comment |
add a comment |
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