Jump to content

why does it return the word ARRAY and not what i want ?


ricky spires

Recommended Posts

hello.

 

im trying to get some results from a db and all i keep getting is the word ARRAY ??

 

I want to get all the placeholders that relate to a page.

 

so if pageID=1 has place holder 1, place holder 2 and place holder 3 it will return 1, 2, 3  etc...

 

in the db i have

 

id    pageID    phNumber

1        1          1

2        1          2

3        1          3

etc..

 

 

this is the code i have

 

public function find_placeholders($pageID=0){

	$sql = "SELECT phNumber FROM ".self::$table_name." WHERE pages_id=".$pageID."";
	$result_array = self::find_by_sql($sql);
	return $result_array;
}

 

and on the page i have..

 

<?php echo Placeholders::find_placeholders($pageID); ?>

 

all i get is

  Quote
Array

 

 

once i solve this problem i will want to use each number in the array to find the content for each.

so if i get 1,2,3

 

i will try and do some thing like.

foreach placeholder number echo elements

 

but 1 step at a time :)

 

thanks

for any help :)

 

rick

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.