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