Here is an extracted code from my php file. Basically what i want to do now is put the results fetched while in a WHILE loop into an array, lets call it $array99. HOWW??? i am totally stumped here.

Just so you can understand the logic of the program(its irrelevant to my question though), we have partial links stored in the database column ( link_pdf). To get the complete path of a document , i must pre pend it so thats where $pre1 variable comes from.

<?php

$db = openDatabase();

$myQu = "SELECT link_pdf FROM standards WHERE link_pdf LIKE 'Standards/%' ";
$my = mysql_query ($myQu, $db);

while ($row = mysql_fetch_assoc($my)) {

$link = $row['link_pdf'];

    #prepend
    
    $pre1 = 'C:/WAMP/Apache/htdocs/filestore/Document_library/';
    
    #echo "the prepended bit is $pre1 \n";
    
    $path = $pre1.$link;
#echo "the complete path is $path"."<br>";

}

Just add $patharray[] = $path; into your while loop.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.