View Thread
Post your improvements and modifications to forum index.php here.
php help
|
||||||||||||||||||||
afoster |
Posted on 21-03-2018 17:51
|
|||||||||||||||||||
Junior Member Posts: 19 Joined: 21-09-2012 |
I did not see a forum category that would allow me to post this so I am adding it here. First of all...this is not php-fusion related and just looking for some help. I am trying to pull information from a file and have it displayed in two columns except that I want the first piece of data in the first column, then the next one in the second column and the next one in the first column again, etc. I have looked everywhere and can't find any sample code that will allow me to do this and hope that you can help. I've got it displaying in one column already but want it in two columns. This data is being updated dynamically and the display would also be displayed dynamically. Any help would be much appreciated. |
|||||||||||||||||||
|
||||||||||||||||||||
Fusioneer |
Posted on 21-03-2018 20:59
|
|||||||||||||||||||
Super Admin Posts: 64 Joined: 20-10-2011 |
Can you post your php code? How is the data in the file separated? Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
|
|||||||||||||||||||
|
||||||||||||||||||||
afoster |
Posted on 21-03-2018 21:29
|
|||||||||||||||||||
Junior Member Posts: 19 Joined: 21-09-2012 |
Here is the code I am using:
The file that it is pulling from is the attachethis. (It would not let me attach the file. Code Download source SECTION=HEADER Edited by Fusioneer on 22-03-2018 21:32 |
|||||||||||||||||||
|
||||||||||||||||||||
afoster |
Posted on 21-03-2018 21:31
|
|||||||||||||||||||
Junior Member Posts: 19 Joined: 21-09-2012 |
The last post is the one you need to look at...disregard the first two responses. | |||||||||||||||||||
|
||||||||||||||||||||
Fusioneer |
Posted on 22-03-2018 21:36
|
|||||||||||||||||||
Super Admin Posts: 64 Joined: 20-10-2011 |
Cleaned up this thread a bit and removed the email addresses from your data. I've added your code to a panel and is displayed at the front page at the bottom. Can you describe what you want? Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
|
|||||||||||||||||||
|
||||||||||||||||||||
afoster |
Posted on 22-03-2018 22:36
|
|||||||||||||||||||
Junior Member Posts: 19 Joined: 21-09-2012 |
The panel that you have added is pretty much what I want except that as you can see, it is duplicating some of the information. As an example, the information for Rick T is displayed as the last entry in column one and the first entry in column 2. This information would be dynamically updated as the players submit their information and what I want is for the first player to submit his info to appear in column one, the second player to submit his info displayed in column two, the third player to submit his info back in column one and etc. That is what I have been struggling with. | |||||||||||||||||||
|
||||||||||||||||||||
afoster |
Posted on 23-03-2018 14:58
|
|||||||||||||||||||
Junior Member Posts: 19 Joined: 21-09-2012 |
A friend of mine figured out how to do it dynamically. The change is in the second column code as follows: for ($x=$i; $x<$num; $x++) { (line 85 of the file) This line replaces the line that showed: for ($i=22; $i<$num; $i++) { (line 100 of the file) Thanks Fusioneer for your help. |
|||||||||||||||||||
|
||||||||||||||||||||
afoster |
Posted on 11-02-2019 22:36
|
|||||||||||||||||||
Junior Member Posts: 19 Joined: 21-09-2012 |
Revisiting this post again. I would like to pull data from an mysql table and place it in 3 columns, very similar to the data being pulled from a txt file as noted in this thread. Here is the code I am using and it is working as except it is placing the data into 2 columns instead of three. Any assistance would be much appreciated. This is not a php-fusion related issue although some of the code you see is fusion related. Code Download source $servername = "localhost"; |
|||||||||||||||||||
|
||||||||||||||||||||
afoster |
Posted on 27-02-2019 18:47
|
|||||||||||||||||||
Junior Member Posts: 19 Joined: 21-09-2012 |
Never mind...I got to work. | |||||||||||||||||||
|
Jump to Forum |
Gebruik BBcode of HTML om naar; 'php help', te verwijzen!
BBcode: | |
HTML: |