Problem: Write an article based on this summary: Add three lines of code to your script. Add these before any other code at the beginning of your function. Add this line right after the closing curly brace of your function. For sake of clarity here is the entire code sample. A variable declared inside a function cannot be used outside the function. Play around with functions!

Answer: For example if i tried to echo $input outside of the function, PHP would throw an error because i have not created that variable outside of the function. So note that variables created in a function (including the arguments) can only be used inside that function. Variables declared outside of a function can only be used outside of functions (unless you use them as an argument of course).That said, there is a command that allows you, in a function, to use a variable created outside a function. That command is "global", in the code above we use global with the variable $num so we could change it or access its value in our function. If you test the code, you will get the values 50 and 240. Build your own function that is really useful. Use them in your future PHP projects. Using functions can improve code modularity and the size of the overall project.

Problem: Write an article based on this summary: Offer support. Listen carefully. Allow him to express himself in his own way. Make it clear to him that it's okay to not feel okay.

Answer: This can be tricky because some men want support by having companionship while others just want space. Overall, a man wants to know that you are on his side. He also wants to know that he can count on you as a source of relief. Try offering to listen should he wish to talk. If you think something is bothering him, bring up the topic in a non-threatening way. You might ask, "I've noticed you seem a little preoccupied lately, is there something different happening at work?" Many will not volunteer to openly talk about their problem, but some will if asked. If he asks for space, don't take it personally. Once he clears his head, he might be more willing to reach out to you now that he knows you are there for support. A man may or may not choose to share what's on his mind. Unfortunately, some men tend to associate talking about feelings with weakness. If he decides to talk, listen openly without interruption. Try to avoid offering solutions or giving advice, unless he asks. Stay away from making trite comments such as, "You'll get over it," or "Don't worry about it." Comments such as these are nonconstructive and only hurt because they diminish his feelings. If he doesn't wish to speak, sit with him quietly. A gentle question or two might help, but don't badger. Don't bring up his struggles or stressors. If he wishes to discuss these, he'll bring them up on his own. As mentioned earlier, some men react to stress by feeling the need to be strong or active. Such responses are okay so long as he is not ignoring the real issue. Give him permission to respond with anger, or to be more cognitive or analytical, or if grieving, to not cry. Don't minimize his feelings but do point out realities and offer hope. All of these typical masculine responses may help him cope; there is no "right" way to express feelings. Don't set a timeframe on his feelings and don't expect him to express himself a certain way. Let him take the lead. Unfortunately, because of societal conditioning, many men believe that feeling sad or scared is a sign of weakness. Reassure him by informing him that all feelings are part of being human. There is no "good" feelings or "bad" feelings. Remind him that you do not think less of him even if he doesn't feel okay.

Problem: Write an article based on this summary: Keep a consistent sleep schedule to help you fall asleep. Exercise Cut back on caffeine, sugar, nicotine, and alcohol. Limit napping because it can interfere with your sleep schedule.

Answer: Although it may not always be possible, developing a consistent sleep schedule can help you fall asleep faster and stay asleep. Aim to go to sleep and wake up at the same time each day, even on weekends and holidays. Choose a bedtime that works best for your work schedule, while also leaving you feeling refreshed. For instance, if you work full-time, try going to bed by 11:00 PM and waking up at 7:00 AM each day. for 30 minutes daily to burn excess energy. An all-natural solution to help reduce the number of sleepless nights in your life is to make sure you're getting enough physical activity. Exercise has been shown to help people fall asleep faster and improve the quality of their sleep. Try using daily exercise to combat symptoms of insomnia. Aim for at least 30 minutes of exercise every day. Work out at least 1-2 hours before your bedtime. There are many substances that can make it tricky for you to fall and stay asleep. Caffeine, sugar, nicotine, and alcohol are the most common substances that can prevent you from sleeping well. Try to limit or totally avoid these substances while dealing with poor sleep. Don't drink anything with caffeine after noon. Avoiding alcohol can result in a more restful and deep sleep. It's important to note that frequent naps may interfere with your sleep patterns. Getting in many quick naps or just a few long ones can make you feel less tired when it comes time for bed. Try to avoid taking naps at all if you're struggling to sleep well at night. Avoid taking any naps that are longer than 30 minutes. Try to cut out napping entirely if you are able to do so.

Problem: Write an article based on this summary: Stick with your meds. Work on accepting your condition. Remind yourself that there are ways to live a normal life. Avoid stressors. Get regular exercise. Get enough sleep. Eat healthy foods. Try out cognitive techniques. Try distraction. Challenge distorted thoughts. Try to keep busy. Avoid taking in a lot of caffeine. Avoid alcohol.

Answer:
It can be common for those with schizophrenia to stop taking their medication. You can use a few approaches to try to stick to using your medication in times when you feel like quitting : Remind yourself that your medications treat, but tend not to cure, schizophrenia. This means for you to continue to feel better, you likely need to keep taking your medications. Use any social support you have; tell your family or friends when you are feeling well to strongly encourage you to keep going on with your meds when you feel like stopping. You could record yourself a message for your future self, telling you to keep going with your meds and why (they are a treatment not a cure) and have your family play it back to you when you feel like quitting. Accepting your condition may help to make your recovery an easier experience. On the other hand, denying that something is wrong or thinking that your condition will just go away may lead to your condition actually getting worse. Because of this, it is important to begin your treatment and accept these two facts: Yes, you have schizophrenia and it will be challenging to deal with. But yes, you can live a normal, happy life. Schizophrenia isn't a hopeless condition. You can learn to live with it. While accepting your diagnosis is important for seeking treatment, being willing to fight for a normal life can help you to live the life that you want to live. The initial shock upon hearing the diagnosis can be a very tough for the diagnosed and their families. Living a normal life is possible but it may take some time to adjust to your condition and to find the right treatment plan for you. People with schizophrenia who take their medications and go to therapy can have very few problems with social interactions, holding a job, having a family or otherwise excelling in life. Schizophrenia is often brought on when you experience a severe amount of stress. Because of this, if you have this condition, it is important to avoid things that may stress you out and cause you to have an episode. There are multiple ways to deal with stress, such as by: Each individual will have different stressors. Going to therapy can help you to identify the things that cause you stress, whether it be a specific person, situation, or place. Once you know your stressors, work hard to avoid them when you can. You can, for example, practice relaxation techniques, such as meditation or deep breathing. Exercise not only relieves your body of stress, but it can release endorphins which can increase your sense of well-being. Try listening to music that pumps you up and helps you get through your workout. Not getting a proper night's rest can contribute to feelings of stress and anxiety. Be sure to get plenty of sleep at night; figure out how many hours a night you need to feel rested and stick to that. If you have trouble sleeping, try making you bedroom completely black and silent by blocking out sounds, changing your environment, or wearing a sleeping mask and earplugs. Get into a routine and follow it every night. When you eat unhealthy foods it can make you feel negative, which can add to your stress levels. Therefore, it is important to eat right to combat stress. Try eating lean meats, nuts, fruits, and vegetables. Eating healthy involves having a balanced diet. Avoid eating too much of any one food. Although these are not a substitute for therapy or for a therapist, there are cognitive techniques you can try to alleviate your symptoms. You can, for example, use a technique called normalization. In this technique you see your psychotic experiences as part of the same continuum that includes normal experiences, and acknowledge that everyone has experiences that vary from normal, everyday life. This may make you feel less alienated and stigmatized, which can have a positive impact on your health outcomes. To cope with auditory hallucinations, such as hearing voices, try listing evidence against the content of the voice. For example, if a voice is telling you to do something negative, like stealing, list reasons why that is not a good idea (e.g., you could get into trouble, it is against social norms, it would cost someone else, most people would tell you not to do it, so don't listen to this one voice). If you are suffering from hallucinations, try distracting yourself in some way, by, for example, listening to music or making artwork. Do your best to become fully immersed in this new experience as it may help to block out unwanted experiences. To deal with the social anxiety that can accompany schizophrenia, try to identify then challenge distorted thoughts. For example, if you have the thought that "everyone in this room is looking at me" try questioning the truth value of this statement. Look around the room for evidence: is it the case that in fact everyone is looking at you? Ask yourself how much attention you pay to any one person when they are just walking about in public. Remind yourself that in a crowded room there are many people, and so people's attention is likely bouncing around to all of them, and they are probably not just all focused on you. Once you have your symptoms under control through medication and therapy, you should try to restart your normal life and keep busy. Idle time can lead to thinking about things that stress you out, which in turn may lead to an episode. To stay busy: Put in an effort at your job. Organize time to spend with your friends and family. Take up a new hobby. Help out a friend or volunteer somewhere. Sudden spikes in caffeine might make 'positive' symptoms of schizophrenia worse (i.e., unwanted additions such as delusions or hallucinations); although if you normally drink a lot of caffeine, stopping or having caffeine may not affect your symptoms for better or worse. The key is to avoid a large sudden change in your caffeine habits. It is recommended that individuals not consume more than 400 mg of caffeine a day. However, keep in mind that individuals' body chemistries will vary, as will their prior history with caffeine, so you may be able to tolerate a little more or less than this Drinking alcohol is associated with worse treatment outcomes, increased symptomatology, and a higher rate of re-hospitalization. You will be better off if you refrain from drinking alcohol.