I am currently working on displaying some arrays using PHP and MySQL.
The simplified code looks like this:
$ sql = "select from the program"; $ Result = mysqli_query ($ dbc3, $ sql); $ Tryout_reports = array (); While ($ line = mysqli_fetch_assoc ($ result)) {$ tryout_reports [] = $ line ['file_name'] "
"; } $ Detail_report ['tryout_reports'] = $ tryout_reports;
I have extracted a lot from SQL, so if there is something wrong with it, please do not pay attention. SQL statement works fine.
The problem is that each value is being output from comma separated, and it looks really bad.
When the run is running, the HTML looks like this:
File 1.pdf & lt; Br> "," File 2.pdf & lt; Br> "," e.t.c. Now, I have seen a bit and I have tried the following:
ltrim () rtrim () explosion (str_replace) Code> I know that rtrim works, but it does not remove the comma, I tried to do something like this:
$ tryout_reports [] = rtrim ( $ Line ['file_name'], "pdf");
And it took the PDF out of the end of every one, but when I replace "pdf" with "", then it does nothing.
Actually stuck,
EDIT: Forgot to add, this page that uses this data and displays on the page is in it:
table.append ("<< tr> | Tryout Reports " + Data [0]. Tryout_reports + "& lt; / td> & lt; / tr & gt;"); This is inside a jQuery function which clicks the job number to display additional information. This comma comes from javascript because you directly parse the array, you may join: w3schools .com / jsref / jsref_join.asp
Popular posts from this blog
Long time ... I do not think it's possible, but I'm shocked before! I tag anchor tags, all of which are background images, all 300px wide but their height is all the difference, is it really set to do without typing altitude? Is it to set the dimensions of BG URL? Thank you! I do not think people understand - my mistake is to hurry the question. Here is the code as an example: # ago -1 {width: 300px; Height: 410px; Background: url ('/ image-1.jpg');} # East -2 {width: 300px; Height: 420px; Background: url ('/ image-2.jpg');} # Pre-3 {width: 300px; Height: 430px; Background: url ('/ image-3.jpg');} # Pre-4 {width: 300px; Height: 440px; Background: url ('/ image-3.jpg');} & lt; A href = "#" id = "ex-1" & gt; & Lt; / A & gt; & Lt; A href = "#" id = "ex-2" & gt; & Lt; / A & gt; & Lt; A href = "#" id = "pre-3" & gt; & Lt; / A & gt...
I am thinking that there is something that I can do better so that my process list should start with the command with MySQL Be clear Currently I am looking for a lot: 17325 user_a localhost db_1 sleep 1132 NULL 17464 user_a localhost db_1 sleep 1124 NULL 17983 user_a localhost db_1 sleep 1078 null 18113 user_a localhost db_1 sleep 1068 NULL 18207 user_a localhost db_1 sleep 1060 NULL 18231 user_a localhost db_1 sleep 1058 NULL 18353 user_a localhost db_1 sleep 1047 NULL 18447 user_a localhost db_1 sleep 1040 null 18489 user_a localhost db_1 sleep 1036 NULL 23408 user_a localhost db_1 sleep 637 NULL Something in my phpscript is that I want to clean it Can i The script looks like: Select the ID from $ q = 'db_1 where fkId = 2'; $ Ar = mysql_query ($ q); ($ Line = mysql_fetch_array ($ qr)) {echo ($ row ['id'];} Thanks in advance! I'm guessing that when you have 10 threads, you're constantly using the connectio...
I am working on a program that is considered to be reading the content of a file in the list of links "hypercard stack "(I have listed special). I know that there is a list in the C ++ standard library, but since I've never worked with the standard library before, I do not know how to make it work with this particular problem for. Any code I have received here has been successful in collecting bits of online bits and online tutorials together. My .h file: // program6.h #include & lt; Iostream & gt; # Include & lt; Fstream & gt; #include & lt; String & gt; # Include & lt; List & gt; using namespace std; Square node {public: node (); Node (four code, integer number, string data); Node (node and node); ~ Node (); Bool readFile (); Zero set next (node * next); Zero print (); Private: four codes; Int Num; String data; Node * next; }; My implementation file: // program6.cpp #include "program6.h" #include & lt;...
|
Comments
Post a Comment