But with mysql_result you'll get see one CELL only. Maybe you need to use
something like
$dates = array();
while ($row = mysql_fetch_array( $date_result)) {
array_push($dates, $row["date"]);
}
return $dates;
-
Pekka Saarinen
http://photography-on-the.net
-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t;;
$color = $hex_r .$hex_g .$hex_b;
return $color;
}
Use it like this:
$my_bg_color = hexcolorshifter($my_bg_color,".8");
If you brighten a color, each channel will clip at 255, so in
situations where you have light source color you will most likely have
hue shifts
Hi,
I have a very odd problem with PHP 4.22 (no acceleration) and Apache 1.3:
Getimagesize fails to see an image from URL randomly (1 out of 8 tries),
although the image is definitely there (trust me) and the server is under
zero load.
I tried also urlExists() from
http://www.php.net/manual
a few minutes task to search and replace all sources to convert them to
$_GET and $_POST.
For commonly used $PHP_SELF I use this:
if (isset($_SERVER)) $PHP_SELF = $_SERVER['PHP_SELF'];
$scriptname = basename($PHP_SELF);
This way users don't have to select from two source ve
g correctly and your server rejects the mail as it
cannot verify the sender host. Also, many (well configured) servers do not
send when there is no live account for that sender.
-
Pekka Saarinen
http://photography-on-the.net
-
--
PHP General
rom odd coding styles you might also use eval :)
$variable1[0]="one";
$variable2[0]="two";
$variable3[0]="three";
$variable4[0]="four";
$j=1;
while($j<5){
eval("print \"\$variable" . $j . "[0]\";");
$j++;
}
-
Pekka Saarinen
http://photography-on-the.net
-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
insert time was: " . $diff1 . "s";
$start = getMicrotime();
$array2 = array();
for ($n=0;$n>=1;$n++) {
array_push($array2,$n);
}
$stop = getMicrotime();
$diff2 = $stop - $start;
print "array_push time was: " . $diff
y just
place one pixel on selected resolution matrix. The talk "Mac is 72" and "PC
is 96" has no meaning because screen dpi changes with resolution and
monitor image size adjustments.
-
Pekka Saarinen
http://photography-on-the.net
At 7/7/2002, you wrote:
>Is there any way of doing this so within a single page?
>
>Can this be done using only PHP or do I need to use Javascripts?
>Where would I be able to find examples of code which does this sort of
>processing?
Hi,
I would do it in PHP, because you can never ever rely on J
At 7/6/2002, you wrote:
>SORT BY and ORDER by
I mean LIMIT and ORDER BY of course
Time for some more coffee.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
g a choice to use
PHP for pagination and sorting on "own server RAM/CPU" may by beneficial. I
also believe that anything that produces less load to MySQL is good.
This is just my experience: I believe in empirical research :)
Pekka
-
Pekka Saarinen
http://photography-on-the.net
-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
erver users have no means to set PHP.INI to their liking so
changes like that should be done in longer time span to let developers
update the software _before_ changes in PHP happen.
Pekka
http://photography-on-the.net/
-
Pekka Saarinen
http://photography-on
At 6/21/2002, you wrote:
>PS> What about execution time in ms (with breakpoints)?
>PS> And is there way to measure MySQL query speed in ms?
>
>u can use microtime function
>
> function getMicrotime()
> {
> list($usec, $sec) = explode(" ",microtime());
> return ((float)$usec
Hi,
Is there any way to determine script's memory usage?
What about execution time in ms (with breakpoints)?
And is there way to measure MySQL query speed in ms?
Thanks
Pekka
http://photography-on-the.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
>Which gives out the output:
>Tesing arrays:
>ryan1,
>ryan1.2,
>ryan2,
>ryan2.1.1.1.1.1,
>ryan3,
>ryan3.2,
>
>my question/problem is simply this: how do i stop the last comma from
>coming?
Hi,
See http://www.php.net/manual/en/function.implode.php
Pekka
http://photography-on-the.net/
--
PHP
At 4/30/2002, you wrote:
>At 4/30/2002, you wrote:
>>Any one know how to display, go to page number on a record list page
>>
>>eg
>>
>>
>
>Here's a very simplified demo of dropdown+arrows paging code I did for my
>gallery software.
>It might not be the most clever code around, but it works, and s
At 4/30/2002, you wrote:
>Any one know how to display, go to page number on a record list page
>
>eg
>
>
Here's a very simplified demo of dropdown+arrows paging code I did for my
gallery software.
It might not be the most clever code around, but it works, and scales well.
All you need to edit i
Hi,
Make an array $arr of all the states and loop
$state = "AR";
$arr = array();
array_push($arr, "AL", "AR", "AZ");
foreach ($arr as $key => $value)
{
if ($state == $value){
include("Calc$value.class.inc");
}
}
Cheers,
Pekka
http://photography-on-the.net/
At 4/27/2002, you wrote:
>H
n and have $PHP_SELF replaced
with $_SERVER['PHP_SELF'] when executed in 4.2 or newer?
This way I would avoid putting out separate versions for PHP 4.2 or newer.
Thanks,
Pekka
http://photography-on-the.net/ee/
-----
Pekka Saarinen
http://photography-on-the.net
-
Hi,
Do you have any good sites which list (and review) php applications?
I already know http://www.hotscripts.com/PHP/Scripts_and_Programs/ and
http://php.resourceindex.com (they update the content two moths late!).
Thanks,
Pekka
http://photography-on-the.net/ee/
--
PHP General Mailing Lis
At 3/20/2002, you wrote:
>$newstr = preg_replace('/\b(\S+@\S+)\b/',
>'mailto:\1";>\1', $oldstr);
>
>Take the time to learn Perl-style regular expressions. You can practically
>write Photoshop with them.
>
>miguel
Thanks! It seems to work fine.
If I had time I'd try to learn regexp, but first
At 3/19/2002, you wrote:
>Hi,
>I think the following lines could help you :
>
>$line = "Foobar foobar [EMAIL PROTECTED] foobar foobar";
>list($var1,$var2,$var3,$var4,$var5) = explode(" ",$line);
>echo "$var1 $var2 mailto:$var3";>$var3." ".$var4." ".$var5";
>more or less... i am a newbie in this st
Hi,
I need to search text for @ and replace the mail address around it (i.e.
text between previous and following spaces) so that if I have text
Foobar foobar [EMAIL PROTECTED] foobar foobar.
It'll convert it to
Foobar foobar mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED] foobar foobar.
Anyone?
d = microtime();
// PRINT PERFORMANCE NOTE
print "TABLE HEADER: ";
echo CheckTime($start, $end);
---
PS. Is there some other timer code available?
Thanks for any insight,
Pekka Saarinen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
24 matches
Mail list logo