<?php $string = "/1asdfsafsadf/2asdfvzxcgdtgh/3/"; $paramArr = explode("/",$string); $first = array_key_exists('1',$paramArr) ? $paramArr[1] : 'leeg'; echo $first;
You have javascript disabled. You will not be able to edit any code.