Search found 15 matches

by miguelna
Thu Dec 12, 2002 7:53 am
Forum: PHP General
Topic: variables
Replies: 1
Views: 1731

variables

Code: Select all

$arr1 = array(“al”,”na”,”cl”,”pb”);

$bol_al = “abcd”;
$bol_na = “fghhd”;
$bol_cl = “fghdfg56”;

foreach($arr1 as $k => $v) {

$ddd = $bol_$v //don’t work

}


I want pass to variable $ddd the value of $bol_...

How can I do that?
by miguelna
Fri Oct 25, 2002 3:52 am
Forum: PHP coding => General
Topic: It is possible replace an image color with PHP?
Replies: 2
Views: 1345

I have an image (PNG) with two colours (red and blue). I want change these colours automatically.
Example:
If ($variable1 > 20) change colour blue to yellow.

So, I need a function to change an image colour, is possible do that with PHP?
by miguelna
Thu Oct 24, 2002 8:02 am
Forum: PHP coding => General
Topic: It is possible replace an image color with PHP?
Replies: 2
Views: 1345

It is possible replace an image color with PHP?

It is possible replace an image color with PHP?
by miguelna
Wed Oct 16, 2002 4:20 am
Forum: PHP coding => General
Topic: How can I change the value of one registered variable?
Replies: 10
Views: 3498

One question: What is the best way to declare a global variable to be always present in the page?
I call this page with page1.php?a=2$b=5
But I want the vars c and d, previous declared in the page to print them.
by miguelna
Wed Oct 16, 2002 3:34 am
Forum: PHP coding => General
Topic: How can I change the value of one registered variable?
Replies: 10
Views: 3498

I made this, but the value of the registered variable remains the same. The value myvar1 does not pass to myvar.
by miguelna
Wed Oct 16, 2002 3:12 am
Forum: PHP coding => General
Topic: How can I change the value of one registered variable?
Replies: 10
Views: 3498

How can I change the value of one registered variable?

How can I change the value of one registered variable?
I tried

Code: Select all

session_register(myvar); 
$_SESSION['myvar'] = $myvar1;


I want a variable to be present in all pages. Is this the best way?

Thanks,

M
by miguelna
Mon Oct 14, 2002 10:02 am
Forum: PHP coding => General
Topic: Detect if an image is loaded
Replies: 4
Views: 1718

it's a simple image to display in a web page. Sometimes the variable bb is not availlable, and the image is not loaded. I want detect if yhe image is not loaded, because the i don't control the bb var.

Thanks

M
by miguelna
Mon Oct 14, 2002 9:22 am
Forum: PHP coding => General
Topic: Detect if an image is loaded
Replies: 4
Views: 1718

Detect if an image is loaded

I have an image generated by PHP (image1.php?aa=23&bb=125874). Sometimes this image is not loaded. Can I detect if the image is loaded or not?
I tried

Code: Select all

fopen (“image1.php?aa=23&bb=125874”, “r”)
, but the first argument is invalid…
by miguelna
Mon Oct 07, 2002 9:25 am
Forum: PHP coding => General
Topic: replace in an array
Replies: 7
Views: 2635

replace in an array

I have an array like this:

Code: Select all

$ddd = array(2,3,a,a,a,5,78,a,a,99,0,a,a,a,a,45,a,56)


and I want replace the groups of consecutive letters greater than 2.
So, my array will be

Code: Select all

$ddd = array(2,3,””,””,””,5,78,a,a,99,0,””,””,””,””,45,a,56)


Can someone help me, please?

M

[/code]
by miguelna
Fri Sep 20, 2002 3:20 am
Forum: PHP coding => General
Topic: GET DATE ARRAY
Replies: 3
Views: 1744

The problem is increment the month and the year. I want an array like this

JAN-01, FEB-01,…., DEC-01, JAN-02,…., DEZ-02, JAN-03
by miguelna
Wed Sep 18, 2002 12:41 am
Forum: PHP coding => General
Topic: GET DATE ARRAY
Replies: 3
Views: 1744

GET DATE ARRAY

Somebody knows some form to obtain an Array with all dates in the MM-YY format (Example: MAR-02) between two dates, for example between MAR-99 and JUL-04?
by miguelna
Tue Sep 17, 2002 9:19 am
Forum: PHP coding => General
Topic: FOR LOOP
Replies: 5
Views: 2971

I have some arrays $ponto1, $ponto2,… and I want print the field [2] of the array. My problem is concatenate $ponto with $i to generate the desired name for link to the array.

The same for x. I want a script to increase the value in the right of x, to $x1, $x2, $x3…
by miguelna
Tue Sep 17, 2002 8:55 am
Forum: PHP coding => General
Topic: FOR LOOP
Replies: 5
Views: 2971

my code is: <? for ($i = 1; $i < 23; $i++) { ?> <area shape="rect" coords="<? echo $x.$i.",".$y.$i.",".($x.$i+10).",".($y.$i+10) ?>" href="<? echo "$PHP_SELF?a_cor=1"; ?>" alt="<? echo $ponto.$i[2...
by miguelna
Tue Sep 17, 2002 7:21 am
Forum: PHP coding => General
Topic: FOR LOOP
Replies: 5
Views: 2971

FOR LOOP

wat's wrong with the following code? I want change the values at right of the x and y. $x1, $x2, $x3.... and $ponto1[2], $ponto2[2], $ponto3[2]... I tried $x$i Help!!! <? for ($i = 1; $i < 23; $i++) { ?> <area shape="rect" coords="<? echo $x$i.",".$y$i.",&q...
by miguelna
Wed Sep 04, 2002 1:03 am
Forum: PHP coding => Images
Topic: attach one PHP image and one GIF
Replies: 2
Views: 2335

attach one PHP image and one GIF

I have one image generated by PHP with some inputs like

image1.php?var1=data1&var2=mytitle

I want attach one image GIF to the first one.

How can I do that?

Thanks,