note 66824 rejected from function.highlight-string by bjori

From: Date: Tue, 30 May 2006 15:39:28 +0000
Subject: note 66824 rejected from function.highlight-string by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-112546@lists.php.net to get a copy of this message
Note Submitter: nick_vd_adel at newvisual dot nl ---- 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 :)

« previous php.notes (#112546) next »