macaela
September 23, 2010, 2:30am
1
Hi i am trying to display image using
```php
'CAT_BIO' => (isset($_GET['c'])) ? '<br />' '<img src="images/' . $row['image'] . ' " width="150" height="200" />' '',
but i get the error
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in
i think a comma or something missing can anyone spot where i am going wrong??
macaela
September 23, 2010, 3:07am
2
when i refresh sometimes it kind flash the images like from the back of the screen bt doesnt show
Try this:
$cat_bio = (isset($_GET['c'])) ? "<br /><img src=\\"images/{$row['image']}\\" width=\\"150\\" height=\\"200\\" />" : "";
Although it is very hard to tell what you’re doing since you didn’t paste an entire PHP statement!
macaela
September 23, 2010, 3:18am
5
didnt work
<img src=\“images/{$row[‘image’]}\” width=\“90\” height=\“90\” />
i need the file to go bk then go in images folders
macaela
September 23, 2010, 3:21am
6
sorry yeah its wrking didnt had the image in the folder THANK U very much
macaela
September 23, 2010, 2:49am
7
like this give no error but doesnt display the image
'CAT_BIO' => (isset($_GET['c'])) ? "<br /><img src=\\"images/{$row['image']}\\" width=\\"150\\" height=\\"200\\" />" : '',
macaela
September 23, 2010, 2:58am
8
I have the felling it might be the folder path that is how do i make this to go out one folder then inside image folder
<img src=\“images/{$row[‘image’]}\” width=\“150\” height=\“200\” />"
macaela
September 23, 2010, 2:46am
9
didnt work this the whole code
$sql = "SELECT *
FROM driversnew
" .$where_sql. "
ORDER BY id ASC";
$db->query($sql);
while ($row = $db->fetch())
{
$template->assign_block_vars('drivers', array(
'CAT_NAME' => '<a href="drivers.php?c=' .$row['id']. '">' .$row['name']. '</a>',
'CAT_BIO' => (isset($_GET['c'])) ? '<br />' '<img src="images/' . $row['image'] . ' " width="150" height="200" />' '',
'CAT_SPONSORS' => (isset($_GET['c'])) ? '<br />' .stripslashes($row['sponsors']): '')
//echo '<img src="admin/images/' . $row['image'] . ' " width="150" height="200 " />';
);
}
the second line i want to be an image