Hi all,
I am relatively new to coding but wondered if someone can helpe me with this. I currently have a PHP file which outputs text that has been entered into a text box and saved.
The original output code was this:
if ( $this->theme->conf->item_description AND $this->doc->data->dmdescription ) :
<?php echo $this->doc->data->dmdescription;?>
but I want the text that shows to be truncated to say, 100 characters plus '...' so I came up with the following...
<?php $someText = ($this->doc->data->dmdescription);?>
<?php echo(substr($someText, 0,100)).'...'; ?>
However it shows nothing. I guess $someText is bing linked to dmdescription rather than the text within dmdescription? Any ideas greatly appreciated!
bplumb