Sign in to follow this  
Followers 0
xAx

Get array item

4 posts in this topic

Hi

How can I get an item from the string below when I only have the separator character and the number of the item?

$string = "item1#item2#item3#item4#item5#"

For example I want to get the third item.

Thanks

Abduljabbar


Abduljabbar Faaiz Al_Kazzazx A x Company islamway.com

Share this post


Link to post
Share on other sites



Read up on StringSplit and Arrays

#Include <Array.au3>; Only Required for _ArrayDisplay

$string = "item1#item2#item3#item4#item5#"
$aString = StringSplit($string, "#")

$ThirdItem = $aString[3]

_ArrayDisplay($aString, "$aString Array")

Hi

How can I get an item from the string below when I only have the separator character and the number of the item?

$string = "item1#item2#item3#item4#item5#"

For example I want to get the third item.

Thanks

Abduljabbar

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0