Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

php explode in vb.net

hello there,
I would like to know how can you write these 3 lines of code into vb.net

    $secret = explode(chr(3),$result);
    $secret = explode(chr(1),$secret[2]);
    $secret = $secret[0];

Open in new window

0
XK8ER
Asked:
XK8ER
1 Solution
 
brendanmeyerCommented:
Hey I'm not 100% if this would work, as I usually code in C#

but it could be a starting

Dim secreta() As String = Split(result, Chr(3))
secreta = Split(secreta(2), Chr(1))
secret = secret(0)

Open in new window

0
 
tap52384Commented:
In PHP:

explode(delimiter, string, [limit]);

$secret = explode(chr(3),$result);
$secret = explode(chr(1),$secret[2]);
$secret = $secret[0];

In VB:

Dim secret as String() = result.split(Chr(3))
secret = secret(2).split(Chr(1))

Open in new window


Don't see the need for the 3rd line.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now