Php Insert Variable Into String Javascript Substring Indexof