note 47701 deleted from function.str-replace by sean

From: Date: Thu, 25 Nov 2004 16:30:16 +0000
Subject: note 47701 deleted from function.str-replace by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81030@lists.php.net to get a copy of this message
Note Submitter: info at idsg dot it ---- My very simple way to add acronym tags on a message: function acronimo($inserito) { $prima = array( 'css', 'php', 'MySql', 'HTML' ); $dopo = array( '<acronym style="cursor: help;" title="CSS: Cascading Style Sheets">CSS</acronym>', '<acronym style="cursor: help;" title="PHP: Hypertext Preprocessor">PHP</acronym>', 'My<acronym style="cursor: help;" title="SQL: Structured Query Language">Sql</acronym>', '<acronym style="cursor: help;" title="HTML: HyperText Markup Language">HTML</acronym>' ); $messaggio = str_replace($prima, $dopo, $inserito); return $messaggio; } $messaggio = acronimo('Questo è un css'); print $messaggio; -------- Return Questo è un <acronym style="cursor: help;" title="CSS: Cascading Style Sheets">CSS</acronym> With this you can add how many Acronym you wish, take attention just to lower and uppercase (i had to fix this) ---- Reason: useless example

« previous php.notes (#81030) next »