note 66824 added to function.highlight-string

From: Date: Tue, 30 May 2006 15:31:32 +0000
Subject: note 66824 added to function.highlight-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-112545@lists.php.net to get a copy of this message
aye guys, i'm kinda stuck.. im trying to create a BBCode for the [code] blocks.. so; here's what i did : i exploded the string which then puts it in the array $lijn ( dutch ) but, now the lines are simply, not highlighted. does anyone know the answer? this is my code : <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <textarea name="test" cols="30" rows="10"></textarea><br /> <input type="submit"> </form> <?php $message = $_POST['test']; $lijn = explode("\n", $message); $totaal_lijnen = count($lijn); echo '<table>'; for ( $i = 1; $i <= $totaal_lijnen; $i++ ) { ?> <tr> <td> <?php echo $i; ?> </td> <td> <?php echo stripslashes( highlight_string ( $lijn[$i - 1], true ) ); ?> </td> </tr> <?php } echo '</table>'; ?> thanks in advance :) ---- Server IP: 83.137.20.120 Probable Submitter: 81.206.157.232 ---- X-Spam-Status: No, hits=4.0 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_50_60,HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.highlight-string.php Edit -- http://master.php.net/note/edit/66824 Del: integrated -- http://master.php.net/note/delete/66824/integrated Del: useless -- http://master.php.net/note/delete/66824/useless Del: bad code -- http://master.php.net/note/delete/66824/bad+code Del: spam -- http://master.php.net/note/delete/66824/spam Del: non-english -- http://master.php.net/note/delete/66824/non-english Del: in docs -- http://master.php.net/note/delete/66824/in+docs Del: other reasons-- http://master.php.net/note/delete/66824 Reject -- http://master.php.net/note/reject/66824 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#112545) next »