Page 1 of 1

php array help

Posted: Tue Sep 09, 2008 3:00 am
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

:)

Re: php array help

Posted: Tue Sep 09, 2008 3:37 am
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?

Re: php array help

Posted: Tue Sep 09, 2008 3:55 am
by imtaqi
What i have to do to make it search for more than 1000 pages???????? 8O

Re: php array help

Posted: Tue Sep 09, 2008 8:33 am
by panic!
Use a database.