what do EOC; ?

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
mtc9003

what do EOC; ?

Post by mtc9003 »

What do EOC; ?
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

They end printing out code block.

For example:

Code: Select all

echo <<<EOC
<br>
<b>asfasf</b>
<br>
<hr>
<p>

EOC;
would print out this to the browser:
<br>
<b>asfasf</b>
<br>
<hr>
<p>


Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image 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
capeloyo
Posts: 3
Joined: Wed Jan 28, 2015 1:44 am

Re:

Post by capeloyo »

Klemen wrote:They end printing out code block.

For example:

Code: Select all

echo <<<EOC
<br>
<b>asfasf</b>
<br>
<hr>
<p>

EOC;
would print out this to the browser:
<br>
<b>asfasf</b>
<br>
<hr>
<p>


Regards
Hi Klemen..

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.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: what do EOC; ?

Post by Klemen »

You can't use function calls inside EOC block.

You will need to format the variable first:

Code: Select all

$ticket['dt'] = hesk_date($ticket['dt'], true);
Then use $ticket[dt] inside EOC.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image 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
capeloyo
Posts: 3
Joined: Wed Jan 28, 2015 1:44 am

Re: what do EOC; ?

Post by capeloyo »

Klemen wrote:You can't use function calls inside EOC block.

You will need to format the variable first:

Code: Select all

$ticket['dt'] = hesk_date($ticket['dt'], true);
Then use $ticket[dt] inside EOC.
Hi Klemen.. :D

Success! Thank you for the generous contribution! :idea: :D :D :D
Post Reply