Translation from PHP to Visual Basic 
Author Message
 Translation from PHP to Visual Basic

Would someone know how to translate this code written for PHP in Visual
Basic? The purpose of this code is to set a variable that defines the
link of a button in a Web page. The button is in an include file and has

to change its value from page to page. (It is a button to access the
page being browsed in a different language: all English files are named
"FILENAME_e.shtml" and French pages "FILENAME_f.shtml" The code takes
the _e.shtml at the end of the file name and changes it for _f.shtml.

/// get the file name
<% arrayOne = explode("/",REQUEST_URI);
$arraylen = count($arrayOne);
$filename = $arrayOne[$arraylen - 1];

/// divide up the file name
$arrayOfFileName = explode("_",$filename);

/// find the new suffix
if ($arrayOfFileName[(sizeof($arrayOfFileName) - 1)] == "e.shtml"){
$suffix = "f.shtml";


$suffix = "e.shtml";


/// loop through filename array and rebuild new filename
$newfile = "";
for($i=0; $i < (sizeof($arrayOfFileName)-1); $i++) {
      $newfile .=  $arrayOfFileName[$i] . "_";

$newfile = $newfile . $suffix;

< 1K Download

Wed, 18 Dec 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Translation from PHP to Visual Basic

2. Visual Basic 6 + PHP (SOAP) ?

3. visual basic and clipper - need a translation

4. Translation of a SOAP Envelope - Visual Basic/SOAP Toolkit to Java/Apache

5. Visual Basic to Word6 translation

6. ToolBook to Visual Basic translation

7. Translation from PHP to VB

8. How to run VB-Scripts in Visual Studio - Visual Basic 6

9. Best site for freelancer work (PHP, Web site, java, oracle sql, php, data entry)

10. Visual FoxPro, Access, PHP/MySql developer looking for contracts

11. do Visual Basic 6.0 and Visual Basic .NET version beta Working Both

12. basic to c translation


Powered by phpBB® Forum Software