Jump to content

adamyork

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by adamyork

  1. I'm only just starting to learn how to use this function, but here is my code: preg_match_all('/((?:[a-z]\w*\s?-*)+|(?:\d+))(?:\s+|$)/i',$team,$matches); As far as I know, this is looking for letters/words, numbers and white spaces. But as well as matching numbers I want it to find minus numbers. Can anyone help me alter my code correctly please?
  2. Unfortunately this is all new to me, so really struggling to get what I want from it! I'm now creating a separate array for the words. But I still want it so that when there is 2 words with a space in between, the space is kept and they become one result. e.g. 1 Hello there 1 2 3 as... [0 ] Hello there rather than... [0 ] Hello [1] there Is this possible?
  3. This helps in getting rid of the words all together. But I was hoping to keep both the words in the array, but simply put them as one single result...
  4. Ok, I'm maybe pushing it now (!), but is there any way I can get it to skip spaces in-between text, and just separate in-between numbers? e.g. Hello there 1 2 3 4 5 [1] Hello there [2] 1 [3] 2 [4] 3 [5] 4 [6] 5
  5. I have a text field that contains the following (example text used): 1 2 3 4 5 6 As you can see the first few are split by a single space, with the last few numbers split by a double space. My aim is to put each of these numbers into a table in a MYSQL database. But I'm having trouble breaking them up.
  6. On my site, I currently have a page that lists my team's fixtures: http://www.cfrclunj.co.uk/fixtures.php As can be seen, in between each separate month there is a row of blank, grey cells. I am now updating the site so that it takes all information from a database (for easier update). On my test page (at bottom) I have recreated the fixtures table using my db: http://www.cfrclunj.co.uk/db_test.php What I am wondering is if there is any way to get the grey monthly separater row into my table. Could this be done by inserting a row of data into the db table that uses an if statement to change it's appearance? Or could I somehow use MYSQL/PHP to make it put a row in for each separate month? I have to admit my PHP and MYSQL skills are still at a very basic level, and so any help would be great!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.