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 :)

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; ?>
Member Avatar for diafol

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.

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

Member Avatar for diafol

Could I ask why you want to do this?

<?php %shortcut%...  ?>

and

<?php $shortcut... ?>

seem pretty similar to me.

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'); ?>
Member Avatar for diafol

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.