what do EOC; ?
Moderator: mkoch227
They end printing out code block.
For example:
would print out this to the browser:
<br>
<b>asfasf</b>
<br>
<hr>
<p>
Regards
For example:
Code: Select all
echo <<<EOC
<br>
<b>asfasf</b>
<br>
<hr>
<p>
EOC;
<br>
<b>asfasf</b>
<br>
<hr>
<p>
Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re:
Hi Klemen..Klemen wrote:They end printing out code block.
For example:
would print out this to the browser:Code: Select all
echo <<<EOC <br> <b>asfasf</b> <br> <hr> <p> EOC;
<br>
<b>asfasf</b>
<br>
<hr>
<p>
Regards
About EOC in ver 2.5.. Previously i'm using ver 2.3 and want to up grade, the issue is..
echo <<<EOC
<tr title="$ticket[message]">
<td class="$color" style="text-align:left; white-space:;"><a?track=$ticket[dt]&Refresh=$random">$ticket[dt]</a></td>
EOC;
how do i put : <td>'.hesk_date($ticket['dt'], true).'</td>in EOC.
bcoz i want date like this : 10-Oct-2012 11:36am
instead this 2015-01-27 15:48:32 by using <td>'.hesk_date($ticket['dt'], true).'</td>
Thank You.
Sorry if you difficult to understand my question.
Re: what do EOC; ?
You can't use function calls inside EOC block.
You will need to format the variable first:
Then use $ticket[dt] inside EOC.
You will need to format the variable first:
Code: Select all
$ticket['dt'] = hesk_date($ticket['dt'], true);
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: what do EOC; ?
Hi Klemen..Klemen wrote:You can't use function calls inside EOC block.
You will need to format the variable first:Then use $ticket[dt] inside EOC.Code: Select all
$ticket['dt'] = hesk_date($ticket['dt'], true);

Success! Thank you for the generous contribution!



