design.php file:
<script>
$(".colr_sldr li img").click(function(){
var src = $(this).attr('src');
var value=src.substring(src.lastIndexOf('/')+1);
<?php $var = "<script>document.write('" + value + "')</script>";?>
});
</script>
and use this variable in index.php file:
<?php
include('design.php');
echo $var;
?>
here while i am printing this variable it is getting zero can any one help