How do i post code in replies?

by ussher
7 replies
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?
#code #post #replies
  • Profile picture of the author ussher
    same thing in a reply:

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

    foreach( as ){
    print 
    "the fruit is: ";
    }
    Signature

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    - jamroom.net
    Download Jamroom free: Download
    {{ DiscussionBoard.errors[3827582].message }}
  • Profile picture of the author Nail Yener
    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.
    {{ DiscussionBoard.errors[3828172].message }}
    • Profile picture of the author ussher
      makes it a _lot_ harder to be helpful, especially in the programming section.
      Signature

      "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

      - jamroom.net
      Download Jamroom free: Download
      {{ DiscussionBoard.errors[3828303].message }}
      • Profile picture of the author Nail Yener
        Originally Posted by ussher View Post

        makes it a _lot_ harder to be helpful, especially in the programming section.
        My solution to that is to put the code into a simple text file and upload it to my personal website and give the link in the post where I want to mention the code.
        {{ DiscussionBoard.errors[3828318].message }}

Trending Topics