Jump to content
invatphp

Eroare afisare

Recommended Posts

Posted


$curl = file_get_contents( "http://la-psiholog.ro/teste-psihologice/afla-ce-cred-ceilalti-despre-tine" ) ;
preg_match_all( '#<div\sclass=\"test-qnr\"\s>(?P<digit>\d+)<\/div>.+?<div\sclass=\"test-q\">(?P<Question>.+?)<\/div>.+?onclick=\"clk(([^\"]*))\".+?<div\sclass=\"test-atxt\">(?P<Answer>.+?)<\/div>#sim',
$curl, $test ) ;
print_r( $test[1] ) ; // Numarul intrebarii
echo "<br/>" ;
echo "<br/>" ;
print_r( $test['Question'] ) ; // Intrebarea
echo "<br/>" ;
echo "<br/>" ;
print_r( $test[3] ) ; // Numarul optiunii de raspuns din intrebare
echo "<br/>" ;
echo "<br/>" ;
print_r( $test['Answer'] ) ; // Raspunsul din intrebare

Eroarea pe care o intampin este ca pentru fiecare intrebare in parte ar trebuii sa-mi afiseze numerele si raspunsurile atatea cate sunt, numai ca mie imi afiseaza doar primele linii de optiune si raspuns de la fiecare intrebare. Unde am gresit in cod si cine ma poate ajuta cu solutie?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...