0

Hello,

I am trying to print the thumbnail out how? I still have error on the thumbnail.

Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\RustoleumCustomCMS\administrator\image_gallery.php on line 147

<table id="admintable" border="1" cellpadding="2" cellspacing="0">
                    <tr>
                        <th>Image</th><th>Path</th><th>thumbnail</th><th>Action</th>
                    </tr>
                    <?php
                    $i=0;
                    while ($data = mysql_fetch_array($result)){
                    $result2=($i%2)?'#DFA09D':'white';

                            echo "<tr bgcolor='$result2'>";
                            echo '<td>'.$data['image'].'</td>';
                            echo '<td>'.$data['path'].'</td>';
                            echo '<td>'.<img src="photos/image".$i>.'</td>';
                            echo '<td><a href="admin.php?mode=delete&id='.$data['id'].'">Hapus</a> |<a href="input_image.php?id='.$data['id'].'">Edit</a></td>';
                        echo '</tr>';

                    $i++;
                    }
                    ?>
                </table>
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by davy_yg
0

im not 100% sure, but i think it has something to do with your mix of single and double quotes.

if you concatenate, i do it like this:
<input type='hidden' name='empID' value='".$data2[0]."'/>

or you can use the braces like so:
var conf = confirm('Supprimer employe {$this->empID}');

remember that variables in double quotes can be interpreted and single are supposed to be literals.

0

line 147 is line 13 in my previous post: echo '<td>'.<img src="photos/image".$i>.'</td>';

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.