PHP text database search method

Source: Internet
Author: User
PHP text database search method, read the PHP text database search method, searchstr = ("> <LINKhref =" http://www.php100.com//statics/style/headfloor_950_081205.css "type = text/cssrel = styleshee PHP text database search method searchstr = ("/". preg_quote ($ searchstr ). "/"); // $ searchstr is the search keyword $ records = file ($ file ); // Obtain the number of all records // $ file is the data file to be searched for $ search_reocrds = preg_grep ($ searchstr, $ records ); // start searching for records // $ search_reocrds indicates the number of records found unset ($ records); if ($ search_records) {// start displaying records, write down your own processing program ********************* while (list ($ key, $ val) = each ($ search_records) {echo "$ val
";} //************************************** **************}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.