Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function issetFilmId($films_id){
- $handle = fopen("val.txt", "r");
- if ($handle) {
- while (($line = fgets($handle)) !== false) {
- if($line == $films_id){
- return TRUE;
- }
- }
- fclose($handle);
- } else {
- return FALSE;
- }
- }
- if (issetFilmId(10)) {
- echo "Exist";
- }
- else {
- echo("Not exist");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement