vinpkl Posted December 16, 2008 Share Posted December 16, 2008 hi all this is the original line <?php echo '<a href="?page=' . $i . '"' . $class . '>' . $prepend . $i . "</a>\n"; ?> i want to add my dealer_id and category_id in it <?php echo '<a href="products.php?dealer_id=". $row['dealer_id'] . "&category_id=" . $row['category_id']."?page="' . $i . '"' . $class . '>' . $prepend . $i . "</a>\n"; ?> its giving syntex error vineet Link to comment https://forums.phpfreaks.com/topic/137162-solved-correct-my-code-syntex/ Share on other sites More sharing options...
genericnumber1 Posted December 16, 2008 Share Posted December 16, 2008 Look at the syntax highlighting right there What's the problem? Hint: think apostrophes. Link to comment https://forums.phpfreaks.com/topic/137162-solved-correct-my-code-syntex/#findComment-716492 Share on other sites More sharing options...
jin29neci Posted December 16, 2008 Share Posted December 16, 2008 try this one I hope this helps.... echo '<a href="products.php?dealer_id="' .$row["dealer_id"] . "&category_id=" . $row["category_id"] .'?page="' .$i . '"' . $class . '>' . $prepend . $i . '</a>\n'; Link to comment https://forums.phpfreaks.com/topic/137162-solved-correct-my-code-syntex/#findComment-716496 Share on other sites More sharing options...
mmarif4u Posted December 16, 2008 Share Posted December 16, 2008 try this: <?php echo "<a href='products.php?dealer_id=$row[dealer_id]&category_id=$row[category_id]?page=$i. $class'>" . $prepend . $i . "</a>\n"; ?> Link to comment https://forums.phpfreaks.com/topic/137162-solved-correct-my-code-syntex/#findComment-716503 Share on other sites More sharing options...
vinpkl Posted December 16, 2008 Author Share Posted December 16, 2008 try this: <?php echo "<a href='products.php?dealer_id=$row[dealer_id]&category_id=$row[category_id]?page=$i. $class'>" . $prepend . $i . "</a>\n"; ?> hi mmarif thanks. solved vineet Link to comment https://forums.phpfreaks.com/topic/137162-solved-correct-my-code-syntex/#findComment-716552 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.