unwanted \ caracter

Posted by marc-andre menard on Stack Overflow See other posts from Stack Overflow or by marc-andre menard
Published on 2009-11-04T15:18:09Z Indexed on 2010/05/30 14:32 UTC
Read the original article Hit count: 394

Filed under:

php code:

<?php 
echo json_encode(glob("photos-".$_GET["folder"].'/*.jpg'));
?>

it return :

["photos-animaux\/ani-01.jpg","photos-animaux\/ani-02.jpg","photos-animaux\/ani-02b.jpg","photos-animaux\/ani-03.jpg","photos-animaux\/ani-04.jpg","photos-animaux\/ani-05.jpg","photos-animaux\/ani-06.jpg","photos-animaux\/ani-07.jpg","photos-animaux\/ani-08.jpg","photos-animaux\/ani-09.jpg","photos-animaux\/ani-10.jpg","photos-animaux\/ani-11.jpg","photos-animaux\/ani-12.jpg","photos-animaux\/ani-13.jpg","photos-animaux\/ani-14.jpg"]

wich is ALMOST perfect, exept for the \ caracter... where it came from ??? no idea HELP

here is the jquery code that call it:

$.get(  'photolister.php',
    				{'folder' : $(this).attr('href')},
    				function(data){startSlideshow(data);console.log(data);}
    			);

© Stack Overflow or respective owner

Related posts about php