Search code examples
laraveldecode

Can't deccode url link "Health%20&%20Beaut" to "Health & Beauty"


I try anyway to decode http://mywebsite/product/get_product?lv1=Health%20&%20Beaut I use html_entity_decode(Health%20&%20Beaut)

I want get "Health & Beauty" But this get Can anyone help me? Thanks


Solution

  • Have you tried to use php's urldecode...

    PHP:

    $x = "Health%20&%20Beaut";
    echo urldecode($x);
    

    Output:

    Health & Beaut  
    

    See http://sandbox.onlinephpfunctions.com/code/4b0ba927391a55b2bf0d9716998f35853e26e7b4