Hello guys :) I can make this with PHP, but iam trying to make with JS. I have some div like this:
<div class="content" id="2"> This is message </div>
<div class="content" id="43"> Hello </div>
<div class="content" id="21"> some content... </div>
I want to get all "id" attributes inside in "content" class. And the all of the ""text"" aswell...
Have to looks like : x = array(2, 43, 21) and y= array(this is message, Hello, some content)
After this i want to fetch foreach ...
foreach () {
echo x;
echo y }
Want to looks like this :
2 this is message
43 Hello
21 some content
Have to looks likesays who? What is this for? What have you tried? Is this homework?