value in code, help?

Hello, im new to this forum. I am also new to php, but im trying to learn as much and as fast as possible.

My original code is:

<?php fancy('galleri/ziva/flerebilder/'); ?>
This works fine. But i want the "ziva" to refrence a value, and this is the code i come up with:
<?php $ziva = 'ziva' ?> <?php fancy('"galleri/"($ziva)"/flerebilder/"'); ?>
This does not work. Im a noob, so please go easy on me.

Hope you can help me with this. Thank you!

Norman.

You can do this:
[php]<?php
$ziva = ‘ziva’;
fancy(‘galleri/’.$ziva.’/flerebilder/’);
?>[/php]

or (with double quotes):
[php]<?php
$ziva = ‘ziva’;
fancy(“galleri/$ziva/flerebilder/”);
?>[/php]

Thank you so much.

Sponsor our Newsletter | Privacy Policy | Terms of Service