Translation from PHP to VB 
Author Message
 Translation from PHP to VB

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. Translation from PHP to Visual Basic

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

4. php/sql in VB

5. parsing data from Vb to PHP

6. Access PHP with VB

7. how to pass a parametre form vb to php/html form

8. Question: SysCmd function translation into VB

9. Language Translation and VB.NET

10. Help with translation c# -> vb

11. PLease help with a C++ to VB translation

12. Translation Problems (C# to VB)


Powered by phpBB® Forum Software