0

hi,
Php developers , need a help here.
how to make php shortuts in

%shortcuts%

or

:shortcuts:

?
I know only a shortcut of

$shortcut

But this is not usefull .
Thanx in advance :)

3
Contributors
7
Replies
8
Views
6 Years
Discussion Span
Last Post by arshalan
0

Hi,
You can embed php values inside a html page by using php shortcut,

<?=$shortcut;?>

Remember, for this short open tags (short_open_tag) must be enabled in php.ini file. And another ways of using the php variables,

<?php echo $shortcut; ?> and <? echo $shortcut; ?>
0

You could use a php templating engine like RainTPL, so you can embed php variables thus:

<p>{$firstpara}</p>

I don't know if this is what you're after.

0

i m using cpanel of http://cpanel.net

Well i already know

<? $shortcut; ?> or <? $shortcut['parts']; ?>

My question was how to make shortcut like ASP symbols in php?
for eg:

<?php %shortcut%  ?>

Thanx again

0

Could I ask why you want to do this?

<?php %shortcut%...  ?>

and

<?php $shortcut... ?>

seem pretty similar to me.

0

almost similar but i like %shortcut% its easy to setup in syntax, some time i become fast while wiriting php codes and syntax become error

<?
$notification(' $user['fullname'] commented on ur photo ');
?>

I wana make this code to easily lyk dat :

<?
$notification('%fullname% commented on your photo'); ?>

Edited by arshalan: n/a

0

Is this proper php anyway:

$notification(' $user['fullname'] commented on ur photo ');

You can use extract() to place array item keys into their respective variables.

Look it up in the php manual.

-2

Okhey lemme try.
do u know a new web language is coming up named 'wbhp' in ipv6

<?wbhp
<page type="text/wbhp" language="wbhp">
//syntax goes her
</page>
?>

And URL Encoding like this:

http://domain.com/index.wbhp?var1=whateva

lol this is similar to php and cgi
Change <page type="text/wbhp"></page> to <page type="text/html"></page> if u wana run html code

Edited by arshalan: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.