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 had exercise with programming in c or classes and I followed the question: Is Buf (local variable in main function)? Either enter the answer in hexadecimal format (like 0x 8 "digits" 0-9 or A-F, 0xbfff0014) or in decimal format. Note here that we want the address of the buff, not its content. The code looks like this: int main (int argc, char * argv []) {while (1) {four buff [1024] = {0}; Int r; .... I then started the code and put the built code in the buff [1024] line and in Typed Gdb p & amp; Buf and it gives me results: 0xbffff0f0 But when I use it in this quiz it gives me the result that this value is wrong. My question is this: Is this the name of the Buff variable (P & E)? Or if not, why not? Exercise is done on the virtualbox machine, so I think everyone should be the same address There is no correct numerical answer, the address may vary from one time to another, it is a programming drill that you say the following three...
|
Comments
Post a Comment