php explode in

Posted on 2013-01-20
Last Modified: 2013-01-21
hello there,
I would like to know how can you write these 3 lines of code into

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

Open in new window

Question by:XK8ER
LVL 14

Expert Comment

ID: 38799661
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


Accepted Solution

tap52384 earned 500 total points
ID: 38800142

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.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now