/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] split error

Hi guys,

i have array containing id and data..my id contain 2 piece of information which i want to split but its showing me error .
error

[code=php]Function spliti() is deprecated in[/code]

my code

[code=php] foreach($_POST as $key => $data)
{
//echo “Reading from for eacharray: “.$key.” “.$data.”<br/>”;

$getData=$key.”_”.$data;

$chunks = spliti (“_”, $getData,10);
print_r($chunks);

}[/code]

can any help on what im doing wrong ?

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@hyperionXSMar 04.2012 — Use explode istead
[code=php]
$chunks = explode("_", $getData, 10);
[/code]
Copy linkTweet thisAlerts:
@NogDogMar 04.2012 — explode() should be perfectly sufficient and preferable for this situation. In a situation where you actually need the power of regular expressions, you should now use preg_split() instead of split() or spliti().
Copy linkTweet thisAlerts:
@jag420authorMar 04.2012 — Works Thanks guys!
×

Success!

Help @jag420 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...