chronoforms - Trim a Text for a php -


i have code in chronoforms page title email each time fills form. however, i'm getting page title data.

for example:

"empodera tu ser con pnl - fundación empoder"  

i'd remove

" - fundación empoder" 

but can't find answer

<input type='hidden' name='page_url' id='page_url' value='<?php echo \juri::getinstance()->tostring(); ?>' />  <?php      $jdoc = \jfactory::getdocument(); ?> <input type='hidden' name='page_title' id='page_title' value='<?php echo $jdoc->gettitle(); ?>' /> 

thanks in advance if can :d

rodrigo

check out str_replace():

$text = 'empodera tu ser con pnl - fundación empoder'; echo str_replace(' - fundación empoder', '', $text); // "empodera tu ser con pnl" 

this isn't elegant solution but, it'll work if part want remove constant. otherwise, you'll need creative , perhaps pattern matching/regex/etc.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -