CodeIgniter Forums
Problems with url - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problems with url (/showthread.php?tid=58648)



Problems with url - El Forum - 07-03-2013

[eluser]Unknown[/eluser]
i am creating hyperlink with following code-:


Code:
anchor("products/categorised_products/'".$item['Product_Id']."'/'".$title['image_size']."'",img(array('src'=>"http://buildershardware.co.in/product_images/'".$item['product_thumb_image']."'",'alt'=>'IMAGE','height'=>'130','width'=>'130')))

but in the resulted url dynamically passed segments like $item['Product_Id'] get single quotes automatically which prevents image to get loaded


Problems with url - El Forum - 07-03-2013

[eluser]PravinS[/eluser]
try replacing by this

Code:
anchor("products/categorised_products/".$item['Product_Id']."/".$title['image_size']."/",img(array('src'=>"http://buildershardware.co.in/product_images/'".$item['product_thumb_image']."'",'alt'=>'IMAGE','height'=>'130','width'=>'130')))



Problems with url - El Forum - 07-04-2013

[eluser]Unknown[/eluser]
thank you very much sir i got my solution