php array help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
imtaqi
Forum Newbie
Posts: 3
Joined: Tue Sep 09, 2008 2:58 am

php array help

Post by imtaqi »

I am using array for my website search engine. My search engine stored website pages information in an array like this
$array_files[0]=array(0,"HTM","http://www.videosea.co.cc/","VIDEOSEA.CO.CC :: Search All Videos in ONE Click","",""," VIDEOSEA.CO.CC :: Search All Videos in ONE Click Search Videos from YOUTUBE, METACAFE, REVVER & more
");

$array_files[1]=array(0,"HTM","http://www.videosea.co.cc/0/tag/Karachi.html","Karachi - VIDEOSEA.CO.CC :: Search All Videos in ONE Click","",""," Karachi - VIDEOSEA.CO.CC :: Search All Videos in ONE Click Search Videos from YOUTUBE, METACAFE, REVVER & more ");

$array_files[2]=array(0,"HTM","http://www.videosea.co.cc/0/tag/Lahore.html","Lahore - VIDEOSEA.CO.CC :: Search All Videos in ONE Click","",""," Lahore - VIDEOSEA.CO.CC :: Search All Videos in ONE Click Search Videos from YOUTUBE, METACAFE, REVVER & m ");
I want that "$array_files[number]"
the number automatically increase if i define a range for it

like from[1-300]

and i not have to put the number in each line can anybody help

:)
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: php array help

Post by josh »

Code: Select all

 
$array = array();
$array[] = 'test';
print_r( $array );
 
http://www.php.net/array_push

Good look writing a search engine using arrays, hope youre not searching more then a few 1,000 pages or so... your database doesnt have built in search functions?
imtaqi
Forum Newbie
Posts: 3
Joined: Tue Sep 09, 2008 2:58 am

Re: php array help

Post by imtaqi »

What i have to do to make it search for more than 1000 pages???????? 8O
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: php array help

Post by panic! »

Use a database.
Post Reply