You are here: Re: [PHP] Re: Newbie Variable Question « PHP « IT news, forums, messages
Re: [PHP] Re: Newbie Variable Question

Posted by Jackson Linux on 10/04/98 11:10

On 9 Mar 2005, at 11:15, Jason Barnett wrote:

> Jackson Linux wrote:
> ...
>> <php include_once "/path/to/cv.$r.include.php"; ?> asks for
>> cv.'1'.include.php ... And I need it to ask for cv.1.include.php
>>
>> How can I make a variable to fetch the literal number from the field
>> cv.category?
>
> Not 100% certain that it will work, but try casting the variable $r to
> an integer:
>
> <?php include_once "/path/to/cv." . (int) $r . ".include.php"; ?>
>
>
Hmmmm. If only. . .This returns, regardless of input and the value of
$r

cv.0.include.php'

For chuckles, I did check and the column is set in the table as INT.
If that matters.
....?

Jack

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация