Parser HTML DOM OR REGEX PHP

Asked

Viewed 35 times

1

I got the following html that the function Curl get back to me

<div class="balance-amounts box-container mp-box-shadow  bg-trama">
            <div class="ch-g1-2">
              <dl class="balance-amounts__list available-money">
                <dt>Disponível</dt>
                <dd class="price price-large mlb">
                <span class="price-symbol">R$</span> <span class="price-integer">0</span><span class="price-decimal-mark">,</span><span class="price-decimal">00</span>
                </dd>
              </dl>
              <dl class="balance-amounts__list account-money">
                <dt>Em conta</dt>
                <dd class="price">
                <span class="price-symbol">R$</span> <span class="price-integer">24</span><span class="price-decimal-mark">,</span><span class="price-decimal">99</span>
                </dd>
              </dl>
            </div>

            <div class="ch-g1-2">
              <dl class="balance-amounts__list other-types-money">
                <dt>Não disponível</dt>
                <dd class="price">
                <span class="price-symbol">R$</span> <span class="price-integer">24</span><span class="price-decimal-mark">,</span><span class="price-decimal">99</span>
                </dd>
              </dl>
              <dl class="balance-amounts__list other-types-money">
                <dt>Em mediação</dt>
                <dd class="price">
                <span class="price-symbol">R$</span> <span class="price-integer">0</span><span class="price-decimal-mark">,</span><span class="price-decimal">00</span>
              </dd></dl>
              <dl class="balance-amounts__list other-types-money">
                <dt>Operações contestadas</dt>
                <dd class="price">
                <span class="price-symbol">R$</span> <span class="price-integer">0</span><span class="price-decimal-mark">,</span><span class="price-decimal">00</span>
                </dd>
              </dl>

            </div>  

and I need you to take the figures this way

 Disponível R$ 0,00 Em conta R$ 24,99 Não disponível R$ 24,99  Em mediação R$ 0,00 Operações contestadas R$ 0,00

any idea how I can do ?

  • Wender take a look at that answer ^ and watch the technique solve your problem.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.