Jump to content

problem Using arrays


joeros

Recommended Posts

I need to be able to pass fieldnames and values in an array

the decoding is done like this

 

public function insert(array $values, $table)
{
	if (count($values) < 0)
		return false;

	foreach($values as $field => $val)
		$values[$field] = $this->escapeString($val);

 

i have tried passing the arrays like this

 

$values = array ("'Joe', 'Timbs', '1985-12-12', 'f', '50'");
insert ($values,"people");

 

but i am not sure how to pass the fieldnames. Can anyone help

 

Thanks to any replies

 

Link to comment
https://forums.phpfreaks.com/topic/204858-problem-using-arrays/
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.