- Joined
- Jun 27, 2011
- Messages
- 6,684 (1.43/day)
Processor | 7800x3d |
---|---|
Motherboard | Gigabyte B650 Auros Elite AX |
Cooling | Custom Water |
Memory | GSKILL 2x16gb 6000mhz Cas 30 with custom timings |
Video Card(s) | MSI RX 6750 XT MECH 2X 12G OC |
Storage | Adata SX8200 1tb with Windows, Samsung 990 Pro 2tb with games |
Display(s) | HP Omen 27q QHD 165hz |
Case | ThermalTake P3 |
Power Supply | SuperFlower Leadex Titanium |
Software | Windows 11 64 Bit |
Benchmark Scores | CB23: 1811 / 19424 CB24: 1136 / 7687 |
I am trying to get update a page text by the variable. I know I am doing this wrong. I am not that good at php but am using php for this project I am on. I am pretty sure I am using the while function wrong. I have tried googling this but can't find an answer because I am not sure what I am doing wrong.
So the two things I really need help with are how to properly do while (251 < $variable <= 350). This way doesn't work.
And how to end the while loop so it does not repeat. That endwhile causes and error.
I know these are pretty simple. I just can't remember how to do it.
So the two things I really need help with are how to properly do while (251 < $variable <= 350). This way doesn't work.
And how to end the while loop so it does not repeat. That endwhile causes and error.
I know these are pretty simple. I just can't remember how to do it.
PHP:
<?php
$variable = 50
$file0 = file_get_contents("file0.txt");
$file1 = file_get_contents("file1.txt");
$file2 = file_get_contents("file2.txt");
while ($variable <= 250) {
echo $file0;
}
while (251 < $variable <= 350) {
echo $file1;
}
while (351 < $variable <= 500) {
echo $file2;
}
endwhile;
?>
Last edited: