CodeIgniter Forums

Full Version: Problems with url
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

[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')))

El Forum

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