|
Posted by Colin McKinnon on 11/17/09 11:50
Sonnich - go get a copy of the PHP manual and read it - its free and even
avilable in .chm format. You can download it from
http://www.php.net/docs.php
Sonnich wrote:
> And while I am at it:
>
> Format - when I want 35 to be shown as 0035 ?
>
printf()
> Is there a way to look for files. eg c:\here\*.pdf (as Dir in VB)?
>
Yes but the builtin does not implicitly support recursion or wildcards - you
need to implement them for yourself. Alternatively you can run external
programs and read the results back into PHP.
>
> Sonnich wrote:
>> I am taking this from VB, but what are int and val in PHP?
Largely redundant since it is dynamically typed. But it does provide ceil(),
floor() and round() along with type casting.
>>
>> $i = Int(Val(substr($code, 3, 3)) / 100) * 100;
>>
Assuming that you may have decimals within the 3 chars:
$i = (integer)substr($code, 3, 3);
C.
[Back to original message]
|