public
Created

displaying and formatting faculty names

  • Download Gist
firstmiddlelastnames
1 2 3 4 5 6 7 8 9 10 11 12
<div class="profile_detail"> <span class="title04">
<?php
$firstpart = strtok($faculty_data['Faculty']['firstName']." ".$faculty['Faculty']['middleName']." ".$faculty_data['Faculty']['lastName']," ");
echo $firstpart;
$tot_len = strlen($faculty_data['Faculty']['firstName']." ".$faculty['Faculty']['middleName']." ".$faculty_data['Faculty']['lastName']);
$len = strlen($firstpart);
$example = substr($faculty_data['Faculty']['firstName']." ".$faculty['Faculty']['middleName']." ".$faculty_data['Faculty']['lastName'],$len,$tot_len-$len);
?>
<br />
<?php
echo $example;
?></span>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.