if(index($item, "id", 0) >= 0){ $appId = substr($item, index($item, "id", 0)+3, length($item)); }