Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP - VBScript ASP

Status
Not open for further replies.

CharlieMike73

Programmer
Joined
May 17, 2002
Messages
120
Location
US
Hi,

Can someone do me to favor of converting this statement to VBScript from PHP, i have tried it myself, no joy!

<?php
if ($x==1){
$y = &quot;data_field2&quot;; $x=0;
} else {
$y = &quot;data_field&quot;;
$x=1;
}
?>

Thank you,

It is just to alternate the Table Row BGcolor for each line in a RecordSet I am working on. It will live within a While loop.

Thnx
 
BTW, does anyone know of any good forums/sites where you can get little snippets of code like this...

I normally work in PHP, but this client wants it in ASP, so its a fun --never going to go to heaven now-- experiance for me,

Regards,
Charlie
 
vbScript would be something like:

if x=1 then
y=&quot;data_field2&quot;
x=0
else
y=&quot;data_field&quot;
x=1
end if
 
Yes that is very much like what I wrote,
only i Dim'ed x and y

Dim x
Dim y

code...

will try it again - strange!

Thnx for your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top