Skip to content
Advertisement

Extract a row by value from php array

This is my array:

JavaScript

How can I extract a row by SocketDecimal?

For example: I want to extract row where SocketDecimal = 50 and make new an array only with that row.

Advertisement

Answer

JavaScript

$newArr will contain the desired “row”. Of course you can manipulate the if-statement depending on which “row” (I’d just call it array entry) you want to extract.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement