Click here to Skip to main content
15,905,427 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
print_r($scrapData);

Result is:

VB
Array ( [0] => Array ( [company] => 1JANATAMF [lastTrade] => 6.70 [changeAmount] => 0.00 [changePercent] => 0.00% ) [1] => Array ( [company] => 1STICB [lastTrade] => 855.00 [changeAmount] => -5.30 [changePercent] => -0.62% ) [2] => Array ( [company] => 1STPRIMFMF [lastTrade] => 19.90 [changeAmount] => 0.10 [changePercent] => 0.51% ) ..................................................................................
...................................................................................
...................................................................................
[287] => Array ( [company] => ZEALBANGLA [lastTrade] => 8.80 [changeAmount] => 0.40 [changePercent] => 4.76% ) )



In this output I want to separate the value of "company", "lastTrade", "changeAmount" and "changePercent"

Please help me. Thank you.
Posted
Updated 17-Mar-14 4:07am
v3
Comments
W Balboos, GHB 17-Mar-14 13:43pm    
From your question, it would seem your have $scrapData and you know the name of the indices of the values you want. Why not just retrieve them from the array?

.

1 solution

Please do not repost the same question multiple times. If you have additional information then use the Improve question link and edit your original post.
 
Share this answer
 
Comments
Maciej Los 15-Mar-14 11:35am    
Richard, do not change the subject of question (by adding: [Repost]). I've been warned that is a bad practice. Rather then it, please report question as "Repost". When 3 reports were achieved, the question is deleted.
Richard MacCutchan 15-Mar-14 12:11pm    
Told by whom? I see lots of people doing it, and it helps to alert other members not to waste time on the question.
Maciej Los 15-Mar-14 12:21pm    
If i good remember... by Paul (OriginalGriff). You can ask Him.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900