How do i post code in replies?

by 7 replies
8
If i post some php code in the starter thread it comes out like this:


PHP Code:
<?php
$fruits 
= array(
 
'apple',
 
'orange',
 
'pear'
);

foreach(
$fruits as $fruit){
print 
"the fruit is: $fruit";
}
but if i do the same thing in a reply all the variables that are prefixed with $ get stripped out.

How do i post code in replies in the warrior forum?
#programming #code #post #replies
  • same thing in a reply:

    PHP Code:
    <?php
     
    = array(
     
    'apple',
     
    'orange',
     
    'pear'
    );

    foreach( as ){
    print 
    "the fruit is: ";
    }
  • I gave up posting PHP codes on this forum a while ago. It doesn't work as it should and I don't know why. I contacted support but I couldn't find a solution.
    • [ 1 ] Thanks
    • [1] reply
    • makes it a _lot_ harder to be helpful, especially in the programming section.
      • [1] reply

Next Topics on Trending Feed