Jump to content

separate this array()


dreamwest

Recommended Posts

What is the best way to seperate this array?

 

["funny games","64,700,000 results","0"],
["funny jokes","20,200,000 results","1"],
["funny quotes","29,200,000 results","2"],
["funny pictures","141,000,000 results","3"],
["funny facebook status","20,100,000 results","4"],
["funny videos","72,000,000 results","5"],
["funny sayings","3,210,000 results","6"],
["funny exam answers","100,000,000 results","7"],
["funny names","99,400,000 results","8"],
["funny","262,000,000 results","9"]

 

Link to comment
https://forums.phpfreaks.com/topic/203833-separate-this-array/
Share on other sites

Here's one way:

<?php
$ary = array(
array("funny games","64,700,000 results","0"),
array("funny jokes","20,200,000 results","1"),
array("funny quotes","29,200,000 results","2"),
array("funny pictures","141,000,000 results","3"),
array("funny facebook status","20,100,000 results","4"),
array("funny videos","72,000,000 results","5"),
array("funny sayings","3,210,000 results","6"),
array("funny exam answers","100,000,000 results","7"),
array("funny names","99,400,000 results","8"),
array("funny","262,000,000 results","9")
);
foreach ($ary as $next) {
   echo $next[0] . "<br>\n";
}
?>

 

Ken

Link to comment
https://forums.phpfreaks.com/topic/203833-separate-this-array/#findComment-1067539
Share on other sites

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.