Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Where can I used nl2br?
Old 06-14-2007, 02:56 PM Where can I used nl2br?
Daman's Avatar
Extreme Talker

Posts: 157
Location: Toronto, CANADA
Trades: 0
I would like all entries from the database that contain line breaks to display the line breaks. Where would I instlall the nl2br? I've tried many different ways and cant make it work. Please help.

PHP Code:
echo "<TABLE>";
$results .="

<td class=\"text1\">
<ol>
    <li><span class=\"name\">
$q1<br />
      <label></label>
    </span><br />
        <br />
    </li>
    <li><span class=\"titles\">2007 Evaluation of Toronto Summer Program </span><br />
        <br />
        <ol>
          <li class=\"text1\"><span class=\"text1\">Do you feel the program lived up to your expectations?</span>
          <p class=\"questions\">
$q2_1</p>
          </li>
          <li class=\"text1\">Do you feel you were provided with a good experience?<br />
          <p class=\"questions\">
$q2_2</p>
          </li>
          <li class=\"text1\">Do you feel that you had a different experience than students summering at other firms? If so, how?<br />
          <p class=\"questions\">
$q2_3</p>
          </li>
          <li class=\"text1\">How do you think the program can be improved?<br />
<p class=\"questions\">
$q2_4</p>
          </li>
          <li class=\"text1\">What were your best and worst experiences over the summer?<br />
<p class=\"questions\">
$q2_5</p>
          </li>
          <li>What two or three things do you wish someone had told you when you started? (i.e. helpful practice tips)<br />
<p class=\"questions\">
$q2_6</p>
          </li>
        </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING THE STUDENT COMMITTEE:</span> <br />
        <br />
        <ol>
          <li>How much contact did you have with the Committee during the summer?<br />
<p class=\"questions\">
$q3_1</p>
          </li>
          <li>Was the Committee responsive to your needs?<br />
<p class=\"questions\">
$q3_2</p>
          </li>
          <li>                    Do you feel you had support throughout the summer?<br />
<p class=\"questions\">
$q3_3</p>
          </li>
          <li>Comments:<br />
<p class=\"questions\">
$q3_4</p>
          </li>
        </ol>
    </li>
    <li><span class=\"titles\">            COMMENTS REGARDING THE SUPERVISORS' ROLE</span><br />
      <br />
      <ol>
        <li>Did you have regular communication with your supervisors?<br />
<p class=\"questions\">
$q4_1</p>
        </li>
        <li>            Comments:<br />
<p class=\"questions\">
$q4_2</p>
        </li>
        <li>Did your supervisors give you work or help to get you work when you needed it?<br />  
<p class=\"questions\">
$q4_3</p>
        </li>
        <li>Did you feel comfortable going to your supervisors for assistance?<br />
<p class=\"questions\">
$q4_4</p>
        </li>
        <li>Did your designated supervisor provide you with timely feedback?<br />
<p class=\"questions\">
$q4_5</p>
        </li>
        <li>Do you feel your supervisors should continue to supervise students?<br />
<p class=\"questions\">
$q4_6</p>
        </li>
        <li>Comments<br />
<p class=\"questions\">
$q4_7</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING SECONDMENTS:</span> <span class=\"questions\">If your secondment has not yet taken place, please provide comments to Sou in due course.</span> <br />
        <br />
      <ol>
        <li>Were you satisfied by your secondment experience?<br />
<p class=\"questions\">
$q5_1</p>
        </li>
        <li>Did you have regular communication with the supervisor at your secondment placement?<br />
<p class=\"questions\">
$q5_2</p>
        </li>
        <li>Did you feel comfortable going to your secondment supervisor for assistance?<br />
<p class=\"questions\">
$q5_3</p>
        </li>
        <li>Did you find the level of supervision of your secondment appropriate?<br />
<p class=\"questions\">
$q5_4</p>
        </li>
        <li>If not, why not?<br />
          <label></label>
<p class=\"questions\">
$q5_5</p>
        </li>
        <li>Did you communicate with your Fasken supervisor(s) during your secondment?<br />
<p class=\"questions\">
$q5_6</p>
        </li>
        <li>Was the level of responsibility afforded to you at the secondment appropriate for your level of experience?<br />
<p class=\"questions\">
$q5_7</p>
        </li>
        <li>If not, why not?<br />
<p class=\"questions\">
$q5_8</p>
        </li>
        <li>Did you find the secondment experience useful?<br />
<p class=\"questions\">
$q5_9</p>
        </li>
        <li>Why or why not?<br />
<p class=\"questions\">
$q5_10</p>
        </li>
        <li>Would you recommend your secondment assignment to other students?<br />
<p class=\"questions\">
$q5_11</p>
        </li>
        <li>Why or why not?<br />
<p class=\"questions\">
$q5_12</p>
        </li>
        <li>Did the opportunity to participate in a secondment influence your decision to summer at Fasken? <br />
<p class=\"questions\">
$q5_13</p>
        </li>
        <li>General comments concerning secondment:<br />
<p class=\"questions\">
$q5_14</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING EVALUATION PROCESS:</span> <br />
        <br />
      <ol>
        <li>Do you have any general comments regarding your reviews or the process in general?<br />
<p class=\"questions\">
$q6_1</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING SECRETARIAL SERVICES:</span><br />
      <br />
      <ol>
        <li>Do you feel you were provided with adequate secretarial support?<br />
<p class=\"questions\">
$q7_1</p>
        </li>
        <li>Do you find that you used secretarial support on a regular basis?<br />
<p class=\"questions\">
$q7_2</p>
        </li>
        <li>                  Do you have any recommendations regarding the Secretarial Services?<br />
<p class=\"questions\">
$q7_3</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING LIBRARY SUPPORT, TRAINING, MATERIALS ETC.</span> <br />
        <br />
      <ol>
        <li>Do you feel the library staff were responsive and helpful?<br />
<p class=\"questions\">
$q8_1</p>
        </li>
        <li>Do you have any comments or suggestions regarding library orientation and / or training programs?<br />
<p class=\"questions\">
$q8_2</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">OTHER COMMENTS:</span>
      <br />
      <br />
      <ol>
        <li>Do you have any suggestions as to how Fasken should continue to develop its profile at your law school?<br />
<p class=\"questions\">
$q9_1</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">EVENTS - PLEASE RANK:</span> <br />
        <br />
      <ol>
        <li>Summer Student Orientation &quot;TGIF&quot; Event<br />
<p class=\"questions\">
$q10_1</p>
        </li>
        <li>Bradshaw Garden Party<br />
<p class=\"questions\">
$q10_2</p>
        </li>
        <li>Students' Golf Day<br />
<p class=\"questions\">
$q10_3</p>
        </li>
        <li>Students/Associates' Beach Volleyball<br />
<p class=\"questions\">
$q10_4</p>
        </li>
        <li>Do you think there were enough social events?<br />
<p class=\"questions\">
$q10_5</p>
        </li>
        <li>          Do you think events interfered too much with personal time?<br />
<p class=\"questions\">
$q10_6</p>
        </li>
        <li>Other suggestions or comments for next year:<br />
<p class=\"questions\">
$q10_7</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">CLIENT SERVICE INITIATIVE EVENTS PLEASE RANK:</span> <br />
        <br />
          <ol>
        <li>Dufferin Aggregates<br />
<p class=\"questions\">
$q11_1</p>
        </li>
        <li>Client Development Techniques with Rosalind Cooper<br />
<p class=\"questions\">
$q11_2</p>
        </li>
        <li>Other suggestions or comments for next year:</li>
<p class=\"questions\">
$q11_3</p>

      </ol>
    </li>
</ol>

</td>

<TABLE width=\"100%\" BORDER=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  <TR>
    <TH WIDTH=\"300\" bgcolor=\"#FFFFFF\"><img src=\"../spacer.gif\" width=\"1\" height=\"1\"></TH>
  </TR>
</TABLE>


"
;
}
//echo $results;

?> 
Daman is offline
Reply With Quote
View Public Profile Visit Daman's homepage!
 
 
Register now for full access!
Old 06-14-2007, 03:37 PM Re: Where can I used nl2br?
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
i don't see any nl2br in you're code .... but any way

if say the content you want transform is in the variable $var fir example before you print it to the screen you trasnformit :
echo nl2br($var);
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 06-14-2007, 03:48 PM Re: Where can I used nl2br?
Daman's Avatar
Extreme Talker

Posts: 157
Location: Toronto, CANADA
Trades: 0
I have tryed that code and it works but when I try to use it in the var $q2_3 below on line 20 I dont get the same result. I'm not sure how to use this in the html I have embedded in the php.

PHP Code:
echo "<TABLE>";
$results .="

<td class=\"text1\">
<ol>
    <li><span class=\"name\">
$q1<br />
      <label></label>
    </span><br />
        <br />
    </li>
    <li><span class=\"titles\">2007 Evaluation of Toronto Summer Program </span><br />
        <br />
        <ol>
          <li class=\"text1\"><span class=\"text1\">Do you feel the program lived up to your expectations?</span>
          <p class=\"questions\">
$q2_1</p>
          </li>
          <li class=\"text1\">Do you feel you were provided with a good experience?<br />
          <p class=\"questions\">
$q2_2</p>
          </li>
          <li class=\"text1\">Do you feel that you had a different experience than students summering at other firms? If so, how?<br />
          <p class=\"questions\">nl2br(
$q2_3);</p>
          </li>
          <li class=\"text1\">How do you think the program can be improved?<br />
<p class=\"questions\">
$q2_4</p>
          </li>
          <li class=\"text1\">What were your best and worst experiences over the summer?<br />
<p class=\"questions\">
$q2_5</p>
          </li>
          <li>What two or three things do you wish someone had told you when you started? (i.e. helpful practice tips)<br />
<p class=\"questions\">
$q2_6</p>
          </li>
        </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING THE STUDENT COMMITTEE:</span> <br />
        <br />
        <ol>
          <li>How much contact did you have with the Committee during the summer?<br />
<p class=\"questions\">
$q3_1</p>
          </li>
          <li>Was the Committee responsive to your needs?<br />
<p class=\"questions\">
$q3_2</p>
          </li>
          <li>                    Do you feel you had support throughout the summer?<br />
<p class=\"questions\">
$q3_3</p>
          </li>
          <li>Comments:<br />
<p class=\"questions\">
$q3_4</p>
          </li>
        </ol>
    </li>
    <li><span class=\"titles\">            COMMENTS REGARDING THE SUPERVISORS' ROLE</span><br />
      <br />
      <ol>
        <li>Did you have regular communication with your supervisors?<br />
<p class=\"questions\">
$q4_1</p>
        </li>
        <li>            Comments:<br />
<p class=\"questions\">
$q4_2</p>
        </li>
        <li>Did your supervisors give you work or help to get you work when you needed it?<br />  
<p class=\"questions\">
$q4_3</p>
        </li>
        <li>Did you feel comfortable going to your supervisors for assistance?<br />
<p class=\"questions\">
$q4_4</p>
        </li>
        <li>Did your designated supervisor provide you with timely feedback?<br />
<p class=\"questions\">
$q4_5</p>
        </li>
        <li>Do you feel your supervisors should continue to supervise students?<br />
<p class=\"questions\">
$q4_6</p>
        </li>
        <li>Comments<br />
<p class=\"questions\">
$q4_7</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING SECONDMENTS:</span> <span class=\"questions\">If your secondment has not yet taken place, please provide comments to Sou in due course.</span> <br />
        <br />
      <ol>
        <li>Were you satisfied by your secondment experience?<br />
<p class=\"questions\">
$q5_1</p>
        </li>
        <li>Did you have regular communication with the supervisor at your secondment placement?<br />
<p class=\"questions\">
$q5_2</p>
        </li>
        <li>Did you feel comfortable going to your secondment supervisor for assistance?<br />
<p class=\"questions\">
$q5_3</p>
        </li>
        <li>Did you find the level of supervision of your secondment appropriate?<br />
<p class=\"questions\">
$q5_4</p>
        </li>
        <li>If not, why not?<br />
          <label></label>
<p class=\"questions\">
$q5_5</p>
        </li>
        <li>Did you communicate with your Fasken supervisor(s) during your secondment?<br />
<p class=\"questions\">
$q5_6</p>
        </li>
        <li>Was the level of responsibility afforded to you at the secondment appropriate for your level of experience?<br />
<p class=\"questions\">
$q5_7</p>
        </li>
        <li>If not, why not?<br />
<p class=\"questions\">
$q5_8</p>
        </li>
        <li>Did you find the secondment experience useful?<br />
<p class=\"questions\">
$q5_9</p>
        </li>
        <li>Why or why not?<br />
<p class=\"questions\">
$q5_10</p>
        </li>
        <li>Would you recommend your secondment assignment to other students?<br />
<p class=\"questions\">
$q5_11</p>
        </li>
        <li>Why or why not?<br />
<p class=\"questions\">
$q5_12</p>
        </li>
        <li>Did the opportunity to participate in a secondment influence your decision to summer at Fasken? <br />
<p class=\"questions\">
$q5_13</p>
        </li>
        <li>General comments concerning secondment:<br />
<p class=\"questions\">
$q5_14</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING EVALUATION PROCESS:</span> <br />
        <br />
      <ol>
        <li>Do you have any general comments regarding your reviews or the process in general?<br />
<p class=\"questions\">
$q6_1</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING SECRETARIAL SERVICES:</span><br />
      <br />
      <ol>
        <li>Do you feel you were provided with adequate secretarial support?<br />
<p class=\"questions\">
$q7_1</p>
        </li>
        <li>Do you find that you used secretarial support on a regular basis?<br />
<p class=\"questions\">
$q7_2</p>
        </li>
        <li>                  Do you have any recommendations regarding the Secretarial Services?<br />
<p class=\"questions\">
$q7_3</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">COMMENTS REGARDING LIBRARY SUPPORT, TRAINING, MATERIALS ETC.</span> <br />
        <br />
      <ol>
        <li>Do you feel the library staff were responsive and helpful?<br />
<p class=\"questions\">
$q8_1</p>
        </li>
        <li>Do you have any comments or suggestions regarding library orientation and / or training programs?<br />
<p class=\"questions\">
$q8_2</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">OTHER COMMENTS:</span>
      <br />
      <br />
      <ol>
        <li>Do you have any suggestions as to how Fasken should continue to develop its profile at your law school?<br />
<p class=\"questions\">
$q9_1</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">EVENTS - PLEASE RANK:</span> <br />
        <br />
      <ol>
        <li>Summer Student Orientation &quot;TGIF&quot; Event<br />
<p class=\"questions\">
$q10_1</p>
        </li>
        <li>Bradshaw Garden Party<br />
<p class=\"questions\">
$q10_2</p>
        </li>
        <li>Students' Golf Day<br />
<p class=\"questions\">
$q10_3</p>
        </li>
        <li>Students/Associates' Beach Volleyball<br />
<p class=\"questions\">
$q10_4</p>
        </li>
        <li>Do you think there were enough social events?<br />
<p class=\"questions\">
$q10_5</p>
        </li>
        <li>          Do you think events interfered too much with personal time?<br />
<p class=\"questions\">
$q10_6</p>
        </li>
        <li>Other suggestions or comments for next year:<br />
<p class=\"questions\">
$q10_7</p>
        </li>
      </ol>
    </li>
    <li><span class=\"titles\">CLIENT SERVICE INITIATIVE EVENTS PLEASE RANK:</span> <br />
        <br />
          <ol>
        <li>Dufferin Aggregates<br />
<p class=\"questions\">
$q11_1</p>
        </li>
        <li>Client Development Techniques with Rosalind Cooper<br />
<p class=\"questions\">
$q11_2</p>
        </li>
        <li>Other suggestions or comments for next year:</li>
<p class=\"questions\">
$q11_3</p>

      </ol>
    </li>
</ol>

</td>

<TABLE width=\"100%\" BORDER=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  <TR>
    <TH WIDTH=\"300\" bgcolor=\"#FFFFFF\"><img src=\"../spacer.gif\" width=\"1\" height=\"1\"></TH>
  </TR>
</TABLE>


"
;
}
//echo $results;

?> 
Daman is offline
Reply With Quote
View Public Profile Visit Daman's homepage!
 
Old 06-14-2007, 03:54 PM Re: Where can I used nl2br?
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
here is a smal part of the code
Quote:
" .....
<li class=\"text1\">Do you feel that you had a different experience than students summering at other firms? If so, how?<br />
<p class=\"questions\">".nl2br($q2_3)."</p>
...."
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 06-14-2007, 03:58 PM Re: Where can I used nl2br?
Daman's Avatar
Extreme Talker

Posts: 157
Location: Toronto, CANADA
Trades: 0
GREAT!Thanks! Now I know how to use php in html embedded in php.

Cheers!
Daman is offline
Reply With Quote
View Public Profile Visit Daman's homepage!
 
Old 06-14-2007, 04:02 PM Re: Where can I used nl2br?
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
you welcome ... TK is appreaciated

one more peace of advice .... instead of using double qoutes ... use simple ones ..... look at the diference
Quote:
$results .='

<td class="text1">
<ol>
<li><span class="name">'.nl2br($q1).'<br />
<label></label>
</span><br />
<br />
</li> ';
no more backslashes
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Reply     « Reply to Where can I used nl2br?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24640 seconds with 12 queries