SMARTY, Array values wont print

hello i have these codes below,


   $arr = array(array(	'cid' => 0,
						'title' => '',
						'email' => '',
						'add_date' => ''));
	$i = 0;

	#$result=mysql_query("SELECT * FROM your table LIMIT $limit1, $limit2");
	$query = "SELECT * FROM castingcall LIMIT $limit1, $limit2";
	$result=mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error());

	while($row = mysql_fetch_array($result)) {
		$arr["cid"][$i] = $row['castingid'];
		$arr["title"][$i] = $row['title'];
		$arr["email"][$i] = $row['email'];
		$arr["add_date"][$i] = $row['date_posted'];		

		echo "<b>". $arr["cid"][$i] ."</b>  ";
		echo " ". $arr["title"][$i];
		echo "<br>";

		$adminsmarty->assign('rows', $arr);


{foreach from=$rows item="row"}

but something is wrong it wont print.

Thank you, very much in advance.

$adminsmarty->assign(‘rows’, $arr);

isn’t it supposed to me

{foreach from=$rows item=row}

Your array loops are really confiusng

since they are associative arroays you might have to be like:


What won’t print? What does print? More info is good…

When you have
{foreach from=$rows item=“row”}

{$rows.cid} should be {$row.cid}

but that will be an array from when you did
$arr[“cid”][$i] = ‘…’;