<?php echo $new_date = date('d-M-Y', strtotime($a->date)); ?>
This will display the date in the provided format.
<?php echo $string = substr($a->question,0,50).'...'; ?>
<?php echo $string = substr($a->question,0,50).'...'; ?>
This will truncate the string after 50 characters and will show '...' after that.
Comments
Post a Comment
Please feel free to comment. I would love to hear feedback.