dersiniar Posted March 11, 2022 Share Posted March 11, 2022 How to make this right if this fails Global $result4 = $result3[1] then it uses Global $result4 = $result3[0] Cant do this with IF @error Then Link to comment Share on other sites More sharing options...
Solution Subz Posted March 11, 2022 Solution Share Posted March 11, 2022 ;~ Check if $result3 is an array ;~ True = if ubound array greater greater than 1 $result3[1] otherwise $result3[0] ;~ False = -1 Global $result4 = IsArray($result3) ? (UBound($result3) > 1 ? $result3[1] : $result3[0]) : -1 dersiniar 1 Link to comment Share on other sites More sharing options...
dersiniar Posted March 11, 2022 Author Share Posted March 11, 2022 10 minutes ago, Subz said: ;~ Check if $result3 is an array ;~ True = if ubound array greater greater than 1 $result3[1] otherwise $result3[0] ;~ False = -1 Global $result4 = IsArray($result3) ? (UBound($result3) > 1 ? $result3[1] : $result3[0]) : -1 Thank you ❤️ it works like charm Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now