Reputation: 6085
hi friends why this php string error ?
echo '<div id="album_list"><a href="view_gallery/album_pix/ .$v['id']. ">' . $i . ' ' . $v['album_name']. '</a></div>';
Upvotes: 0
Views: 109
Reputation: 1119
I'd change your variable names to reduce the confusion. As someone said above syntax highlighting will turn all the strings one color, and the variables another. Stack Overflow even displays code as such.
<?php
$v_id = $v['id'];
$v_album_name = $v['album_name'];
echo '<div id="album_list"><a href="view_gallery/album_pix/' . $v_id . '">' . $i . ' ' . $v_album_name . '</a></div>';
?>
Upvotes: 0
Reputation: 2107
You are missing a single-quote after album_pix/
and before the closing bracket.
echo '<div id="album_list"><a href="view_gallery/album_pix/' .$v['id']. '">' . $i . ' ' . $v['album_name']. '</a></div>';
Upvotes: 1
Reputation: 5700
You have some missing single quotes.
echo '<div id="album_list"><a href="view_gallery/album_pix/ .$v['id']. ">' . $i . ' ' . $v['album_name']. '</a></div>';
// you need a single quote here ^ ^ and here
Upvotes: 3